diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2010-12-07 17:22:45 -0800 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2010-12-22 14:15:40 -0800 |
commit | 4576aa36e9a9671459299c7963ac95aa94beaea9 (patch) | |
tree | 3863574e050f168c0126ecb47c83319fab0972d8 /WebKit/chromium | |
parent | 55323ac613cc31553107b68603cb627264d22bb0 (diff) | |
download | external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.zip external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.gz external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.bz2 |
Merge WebKit at r73109: Initial merge by git.
Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8
Diffstat (limited to 'WebKit/chromium')
80 files changed, 2144 insertions, 238 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index 2e3ce8e..bbcdcbd 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,774 @@ +2010-12-01 Jia Pu <jpu@apple.com> + + Reviewed by Darin Adler. + + Support multiple correction candidates panel for misspelled word on Mac OS X. + https://bugs.webkit.org/show_bug.cgi?id=50137 + <rdar://problem/8568059> + + Adopted new function signature defined in base class. + + * src/EditorClientImpl.cpp: + (WebKit::EditorClientImpl::getGuessesForWord): + * src/EditorClientImpl.h: + +2010-12-01 Alexey Marinichev <amarinichev@chromium.org> + + Reviewed by James Robinson. + + [chromium] renderer does not realize hardware compositing is disabled and crashes + https://bugs.webkit.org/show_bug.cgi?id=50264 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setRootGraphicsLayer): repaint always + (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): null check + (WebKit::WebViewImpl::reallocateRenderer): + +2010-11-30 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Darin Fisher. + + Get the value of the accelerated compositing triggers from the Settings + class. This allows setting the triggers via command line flags. + https://bugs.webkit.org/show_bug.cgi?id=50301 + + * public/WebSettings.h: + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::allowedCompositingTriggers): + * src/WebSettingsImpl.cpp: + (WebKit::WebSettingsImpl::setAcceleratedCompositingFor3DTransformsEnabled): + (WebKit::WebSettingsImpl::setAcceleratedCompositingForVideoEnabled): + (WebKit::WebSettingsImpl::setAcceleratedCompositingForPluginsEnabled): + (WebKit::WebSettingsImpl::setAcceleratedCompositingForCanvasEnabled): + (WebKit::WebSettingsImpl::setAcceleratedCompositingForAnimationEnabled): + * src/WebSettingsImpl.h: + +2010-12-01 Tony Chang <tony@chromium.org> + + Unreviewed, rolling chromium deps to r67811. + + * DEPS: + +2010-12-01 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: disable cookies tab in network resource view by default, enable for chromium + https://bugs.webkit.org/show_bug.cgi?id=50249 + + * src/js/DevTools.js: + +2010-11-30 Ojan Vafai <ojan@chromium.org> + + Revert r72876. It caused a ~30% perf regression in chromium's bloat-http test + https://bugs.webkit.org/show_bug.cgi?id=50288 + + 2010-11-29 Adam Barth <abarth@webkit.org (:abarth) (r)> + Reviewed by Darin Adler. + Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs + https://bugs.webkit.org/show_bug.cgi?id=50182 + A display-isolated URL can only be displayed (e.g., put in an iframe, + hyperlinked to) by documents from that scheme. In a sense, this is a + generalization of some of the protections we give file URLs, but + instead of lumping them all together into one "local" bucket, this + patch creates a separate bucket for each scheme. + For a while, I tried using a separate bucket for each origin. That + would have played nicely with what Blob URLs are trying to do, but some + "chrome" URL pages rely on being able to display other chrome URL + pages, even in different origins. For example, the New Tab Page shows + thumbnails from the "thumbnail" host. + This patch also removes a bunch of unused code. I've also propagated + the "deprecated" status of deprecatedCanDisplay to + deprecatedShouldTreatURLAsLocal because that method has no other + callers and is really asking for uppercase/lowercase bugs. I dream of + someday removing these functions. + 2010-11-29 Adam Barth <abarth@webkit.org (:abarth) (r)> + Reviewed by Darin Adler. + Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs + https://bugs.webkit.org/show_bug.cgi?id=50182 + This patch adds a Chromium API for registering schemes as + display-isolated. In a subsequent patch, I'll change the "chrome" + scheme in Chrome to be display isolated instead of local. That will + prevent file URLs from linking to chrome URLs. + + * public/WebSecurityPolicy.h: + * src/WebSecurityPolicy.cpp: + +2010-11-30 James Robinson <jamesr@chromium.org> + + Reviewed by Dimitri Glazkov. + + [chromium] Update yasm entry in DEPS to match downstream + https://bugs.webkit.org/show_bug.cgi?id=50274 + + http://src.chromium.org/viewvc/chrome?view=rev&revision=67540 changed the downstream DEPS rule + for yasm to pull unconditionally rather than pulling in each deps_os. This changes the WebKit + chromium DEPS to match. + + * DEPS: + +2010-11-29 Vangelis Kokkevis <vangelis@chromium.org> + + Reviewed by Simon Fraser. + + Provide more fine grained control to ports over when to turn on accelerated + compositing. + https://bugs.webkit.org/show_bug.cgi?id=49998 + + As part of this change, the old hasAcceleratedCompositing method on the ChromeClient + has now been replaced by allowedCompositingTriggers which returns a bitfield of + all the features which can trigger the compositor. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::allowedCompositingTriggers): + * src/ChromeClientImpl.h: + +2010-11-30 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] pass webframe to web frame client's cookieJar + https://bugs.webkit.org/show_bug.cgi?id=50148 + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::cookieJar): + * src/ChromiumBridge.cpp: + (WebCore::getCookieJar): + +2010-11-30 Jochen Eisinger <jochen@chromium.org> + + Unreviewed. Roll chromium 67532:67541. + + * DEPS: + +2010-11-29 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs + https://bugs.webkit.org/show_bug.cgi?id=50182 + + This patch adds a Chromium API for registering schemes as + display-isolated. In a subsequent patch, I'll change the "chrome" + scheme in Chrome to be display isolated instead of local. That will + prevent file URLs from linking to chrome URLs. + + * public/WebSecurityPolicy.h: + * src/WebSecurityPolicy.cpp: + (WebKit::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated): + +2010-11-29 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Add substitution parameters to WebKitClient::queryLocalizedString() + https://bugs.webkit.org/show_bug.cgi?id=50053 + + * public/WebKitClient.h: + (WebKit::WebKitClient::queryLocalizedString): Add overload functions with + substitution string parameters, and remove the integer parameter overload. + * src/LocalizedStrings.cpp: + (WebCore::query): Add string parameter overloads, and remove the integer parameter overload. + (WebCore::multipleFileUploadText): Call the string parameter query(). + (WebCore::validationMessageTooLongText): Pass the parameters to query(). + (WebCore::validationMessageRangeUnderflowText): ditto. + (WebCore::validationMessageRangeOverflowText): ditto. + (WebCore::validationMessageStepMismatchText): ditto. + +2010-11-29 Dimitri Glazkov <dglazkov@chromium.org> + + Remove Build directory that was erroneously added in r72103. + + * Build: Removed. + +2010-11-29 Andrey Kosyakov <caseq@chromium.org> + + Reviewed by Darin Fisher. + + Web Inspector: [Chromium] Expose extension API to select a node in WebInspector + Added WebDevToolsAgent::inspect() + https://bugs.webkit.org/show_bug.cgi?id=49727 + + * public/WebDevToolsAgent.h: + * src/WebDevToolsAgentImpl.cpp: + (WebKit::WebDevToolsAgentImpl::inspectNode): + * src/WebDevToolsAgentImpl.h: + +2010-11-29 Dimitri Glazkov <dglazkov@chromium.org> + + [Chromium] Remove python_24 dependency, because it is no longer necessary. + + * DEPS: Removed python_24 dependency. + +2010-11-29 Bernhard Bauer <bauerb@chromium.org> + + Reviewed by Jeremy Orlow. + + Remove databaseFileName from WebIDBFactory + https://bugs.webkit.org/show_bug.cgi?id=50150 + + * WebKit.gyp: + * public/WebIDBFactory.h: + (WebKit::WebIDBFactory::open): + * src/WebIDBFactory.cpp: Removed. + +2010-11-26 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + IDBDatabase and IDBObjectStore remove* methods should be renamed to delete* + https://bugs.webkit.org/show_bug.cgi?id=50113 + + * public/WebIDBDatabase.h: + (WebKit::WebIDBDatabase::deleteObjectStore): + (WebKit::WebIDBDatabase::removeObjectStore): + * public/WebIDBObjectStore.h: + (WebKit::WebIDBObjectStore::remove): + (WebKit::WebIDBObjectStore::deleteFunction): + (WebKit::WebIDBObjectStore::deleteIndex): + * src/IDBDatabaseProxy.cpp: + (WebCore::IDBDatabaseProxy::deleteObjectStore): + * src/IDBDatabaseProxy.h: + * src/IDBObjectStoreProxy.cpp: + (WebCore::IDBObjectStoreProxy::deleteFunction): + (WebCore::IDBObjectStoreProxy::deleteIndex): + * src/IDBObjectStoreProxy.h: + * src/WebIDBDatabaseImpl.cpp: + (WebKit::WebIDBDatabaseImpl::deleteObjectStore): + * src/WebIDBDatabaseImpl.h: + * src/WebIDBObjectStoreImpl.cpp: + (WebKit::WebIDBObjectStoreImpl::deleteFunction): + (WebKit::WebIDBObjectStoreImpl::deleteIndex): + * src/WebIDBObjectStoreImpl.h: + +2010-11-26 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Steve Block. + + Make IDBKeyRange match the spec + https://bugs.webkit.org/show_bug.cgi?id=50105 + + Remove flags and instead add two booleans for being open. + Change left to lower and right to upper everywhere. + + * public/WebIDBKeyRange.h: + (WebKit::WebIDBKeyRange::WebIDBKeyRange): + * src/WebIDBKeyRange.cpp: + (WebKit::WebIDBKeyRange::assign): + (WebKit::WebIDBKeyRange::left): + (WebKit::WebIDBKeyRange::right): + (WebKit::WebIDBKeyRange::lower): + (WebKit::WebIDBKeyRange::upper): + (WebKit::WebIDBKeyRange::lowerOpen): + (WebKit::WebIDBKeyRange::upperOpen): + (WebKit::WebIDBKeyRange::flags): + +2010-11-25 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Steve Block. + + Clean up IDBDatabase.transaction and add checks to IDBTransaction.objectStore + https://bugs.webkit.org/show_bug.cgi?id=50081 + + Plumb IDBTransaction.objectStore's exception code. + + * public/WebIDBTransaction.h: + (WebKit::WebIDBTransaction::objectStore): + * src/IDBDatabaseProxy.cpp: + (WebCore::IDBDatabaseProxy::transaction): + * src/IDBTransactionBackendProxy.cpp: + (WebCore::IDBTransactionBackendProxy::objectStore): + * src/IDBTransactionBackendProxy.h: + * src/WebIDBDatabaseImpl.cpp: + (WebKit::WebIDBDatabaseImpl::createObjectStore): + (WebKit::WebIDBDatabaseImpl::transaction): + * src/WebIDBTransactionImpl.cpp: + (WebKit::WebIDBTransactionImpl::objectStore): + * src/WebIDBTransactionImpl.h: + +2010-11-26 Hans Wennborg <hans@chromium.org> + + Reviewed by Jeremy Orlow. + + IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames + https://bugs.webkit.org/show_bug.cgi?id=50102 + + Rename as per the spec: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface + + * public/WebIDBDatabase.h: + (WebKit::WebIDBDatabase::objectStores): + (WebKit::WebIDBDatabase::objectStoreNames): + * src/IDBDatabaseProxy.cpp: + (WebCore::IDBDatabaseProxy::objectStoreNames): + * src/IDBDatabaseProxy.h: + * src/WebIDBDatabaseImpl.cpp: + (WebKit::WebIDBDatabaseImpl::objectStoreNames): + * src/WebIDBDatabaseImpl.h: + +2010-11-26 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + IDBFactory::open should not have a description argument. + https://bugs.webkit.org/show_bug.cgi?id=50087 + + * public/WebIDBDatabase.h: + (WebKit::WebIDBDatabase::description): + * public/WebIDBFactory.h: + (WebKit::WebIDBFactory::open): + * src/IDBFactoryBackendProxy.cpp: + (WebCore::IDBFactoryBackendProxy::open): + * src/IDBFactoryBackendProxy.h: + * src/WebIDBDatabaseImpl.cpp: + * src/WebIDBDatabaseImpl.h: + * src/WebIDBFactory.cpp: + * src/WebIDBFactoryImpl.cpp: + (WebKit::WebIDBFactoryImpl::open): + * src/WebIDBFactoryImpl.h: + +2010-11-25 Ilya Tikhonovsky <loislo@chromium.org> + + Unreviewed. Roll chromium 67004:67404. + + * DEPS: + +2010-11-25 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Steve Block. + + Add exception code to WebIDBTransaction::objectStore + https://bugs.webkit.org/show_bug.cgi?id=50030 + + * public/WebIDBTransaction.h: + (WebKit::WebIDBTransaction::objectStore): + +2010-11-24 MORITA Hajime <morrita@google.com> + + Reviewed by Kent Tamura. + + [Chromium][Windows] TestShell flakily crashes with EventSender.contextClick() + https://bugs.webkit.org/show_bug.cgi?id=50052 + + makeStringArrayImpl() assumed wtf::StringImpl data is + null-terminated. But it is not. + Changed the code to pass the string length explicitly instead of + making it computed by v8::String::New(). + + * src/WebBindings.cpp: + (WebKit::makeStringArrayImpl): + +2010-11-24 Eric Uhrhane <ericu@chromium.org> + + Reviewed by David Levin. + + [Chromium] Implement FileWriterSync + https://bugs.webkit.org/show_bug.cgi?id=49940 + + Added waitForOperationToComplete, delegating to the bridge. + * src/WorkerAsyncFileWriterChromium.cpp: + * src/WorkerAsyncFileWriterChromium.h: + + Added waitForOperationToComplete and some debug-only code to make sure it's working properly. + * src/WorkerFileWriterCallbacksBridge.cpp: + (WebKit::WorkerFileWriterCallbacksBridge::postWriteToMainThread): + (WebKit::WorkerFileWriterCallbacksBridge::postTruncateToMainThread): + (WebKit::WorkerFileWriterCallbacksBridge::postAbortToMainThread): + (WebKit::WorkerFileWriterCallbacksBridge::WorkerFileWriterCallbacksBridge): + (WebKit::WorkerFileWriterCallbacksBridge::didWriteOnWorkerThread): + (WebKit::WorkerFileWriterCallbacksBridge::didFailOnWorkerThread): + (WebKit::WorkerFileWriterCallbacksBridge::didTruncateOnWorkerThread): + (WebKit::WorkerFileWriterCallbacksBridge::waitForOperationToComplete): + * src/WorkerFileWriterCallbacksBridge.h: + +2010-11-24 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + [chromium] Disable antialiasing for compositor + https://bugs.webkit.org/show_bug.cgi?id=50039 + + * src/WebViewImpl.cpp: + (WebCore::getCompositorContextAttributes): + (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): + (WebKit::WebViewImpl::graphicsContext3D): + +2010-11-24 Satish Sampath <satish@chromium.org> + + Reviewed by Steve Block. + + Remove API migration code which is no longer used. + https://bugs.webkit.org/show_bug.cgi?id=50013 + + * public/WebSpeechInputControllerMock.h: + +2010-11-23 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r72628. + http://trac.webkit.org/changeset/72628 + https://bugs.webkit.org/show_bug.cgi?id=49994 + + This patch is causing layout-test failtures on GTK Linux + 64-bit Debug (Requested by ctguil on #webkit). + + * public/WebAccessibilityObject.h: + * src/WebAccessibilityObject.cpp: + (WebKit::WebAccessibilityObject::parentObject): + +2010-11-23 Chris Guillory <chris.guillory@google.com> + + Reviewed by Dimitri Glazkov. + + Include the FrameView widget of a RenderWidget in the accessibility tree. + https://bugs.webkit.org/show_bug.cgi?id=49106 + + * public/WebAccessibilityObject.h: + * src/WebAccessibilityObject.cpp: + (WebKit::WebAccessibilityObject::equals): + (WebKit::WebAccessibilityObject::parentObject): + +2010-11-23 John Knottenbelt <jknotten@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Introduce wrapper types for WebCore::GeolocationError, WebCore::GeolocationPosition. + https://bugs.webkit.org/show_bug.cgi?id=49735 + + Introduce WebKit API types so that the browser implementation can feed + position and error updates to the WebCore::GeolocationController. + + * WebKit.gyp: + * public/WebGeolocationError.h: Added. + (WebKit::WebGeolocationError::WebGeolocationError): + (WebKit::WebGeolocationError::~WebGeolocationError): + * public/WebGeolocationPosition.h: Added. + (WebKit::WebGeolocationPosition::WebGeolocationPosition): + (WebKit::WebGeolocationPosition::~WebGeolocationPosition): + * src/WebGeolocationError.cpp: Added. + (WebKit::WebGeolocationError::assign): + (WebKit::WebGeolocationError::reset): + (WebKit::WebGeolocationError::WebGeolocationError): + (WebKit::WebGeolocationError::operator=): + (WebKit::WebGeolocationError::operator WTF::PassRefPtr<WebCore::GeolocationError>): + * src/WebGeolocationPosition.cpp: Added. + (WebKit::WebGeolocationPosition::assign): + (WebKit::WebGeolocationPosition::reset): + (WebKit::WebGeolocationPosition::operator=): + (WebKit::WebGeolocationPosition::operator PassRefPtr<WebCore::GeolocationPosition>): + +2010-11-23 Jonathan Backer <backer@chromium.org> + + Reviewed by Kenneth Russell. + + Renderer is resizing IOSurfaces when accelerated compositing is disabled. + https://bugs.webkit.org/show_bug.cgi?id=49827 + + - IOSurfaces are only presented when accelerated compositing is enabled. + - Slight performance increase (and clean-up for using this path for Linux and Windows). + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::resize): + +2010-11-23 Grace Kloba <klobag@chromium.org> + + Reviewed by Kenneth Russell. + + [chromium] Accumulated scroll damage rect should be in the content space + https://bugs.webkit.org/show_bug.cgi?id=49842 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::scrollRootLayerRect): Adjust the previous scroll damage with the scroll delta before union it with the new damage rect. + +2010-11-18 Darin Fisher <darin@chromium.org> + + Reviewed by Dimitri Glazkov. + + Add a mechanism for creating a WebURLLoader that is associated with a + particular WebFrame. + https://bugs.webkit.org/show_bug.cgi?id=49764 + + This will be used by code that calls webKitClient()->createURLLoader() + from within the Chromium source tree. + + An associated WebURLLoader should be treated like a subresource of the + WebFrame's document. + + * WebKit.gyp: + * public/WebFrame.h: + * src/AssociatedURLLoader.cpp: Added. + (WebKit::AssociatedURLLoader::AssociatedURLLoader): + (WebKit::AssociatedURLLoader::~AssociatedURLLoader): + (WebKit::AssociatedURLLoader::loadSynchronously): + (WebKit::AssociatedURLLoader::loadAsynchronously): + (WebKit::AssociatedURLLoader::cancel): + (WebKit::AssociatedURLLoader::setDefersLoading): + (WebKit::AssociatedURLLoader::PrepareRequest): + * src/AssociatedURLLoader.h: Added. + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::createAssociatedURLLoader): + * src/WebFrameImpl.h: + +2010-11-23 Satish Sampath <satish@chromium.org> + + Unreviewed, chromium build fix. + + * public/WebSpeechInputControllerMock.h: + (WebKit::WebSpeechInputControllerMock::setMockRecognitionResult): + +2010-11-18 Satish Sampath <satish@chromium.org> + + Reviewed by Jeremy Orlow. + + For speech input event, send an event object containing all the recognition results and metadata. + https://bugs.webkit.org/show_bug.cgi?id=49736 + + Updated mock object's method to new signature. + + * public/WebSpeechInputControllerMock.h: + * src/WebSpeechInputControllerMockImpl.cpp: + (WebKit::WebSpeechInputControllerMockImpl::addMockRecognitionResult): + * src/WebSpeechInputControllerMockImpl.h: + +2010-11-22 Alexey Marinichev <amarinichev@chromium.org> + + Reviewed by Kenneth Russell. + + [chromium] Implement Extensions3DChromium::getGraphicsResetStatusARB + https://bugs.webkit.org/show_bug.cgi?id=49946 + + * public/WebGraphicsContext3D.h: added isContextLost() + * src/Extensions3DChromium.cpp: + (WebCore::Extensions3DChromium::getGraphicsResetStatusARB): + * src/GraphicsContext3DChromium.cpp: + (WebCore::GraphicsContext3DInternal::isContextLost): + * src/GraphicsContext3DInternal.h: + * src/WebGraphicsContext3DDefaultImpl.cpp: + (WebKit::WebGraphicsContext3DDefaultImpl::isContextLost): + * src/WebGraphicsContext3DDefaultImpl.h: + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::reallocateRenderer): ensure root layer repaining + +2010-11-22 Jay Civelli <jcivelli@chromium.org> + + Reviewed by David Levin. + + Don't create an external popup menu when there are no items to show. + https://bugs.webkit.org/show_bug.cgi?id=49937 + + * src/ExternalPopupMenu.cpp: + (WebKit::ExternalPopupMenu::show): + +2010-11-22 Nat Duca <nduca@chromium.org> + + Reviewed by Kenneth Russell. + + [chromium] Send didActivateAcceleratedCompositing when compositor + initializes but does not create the shared context3d. + https://bugs.webkit.org/show_bug.cgi?id=49930 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): + +2010-11-22 Tony Chang <tony@chromium.org> + + Unreviewed, roll Chromium DEPS to r67004. + + * DEPS: + +2010-11-22 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed. Partially roll out r72282. + It should not have modified devtools files. + + * src/js/devTools.css: + +2010-11-19 Ilya Sherman <isherman@chromium.org> + + Reviewed by Darin Fisher. + + Expose default value of maxLength in Chromium API + https://bugs.webkit.org/show_bug.cgi?id=49723 + + * public/WebInputElement.h: Added constant defaultMaximumLength + * src/WebInputElement.cpp: + +2010-11-18 Zhenyao Mo <zmo@google.com> + + Reviewed by Kenneth Russell. + + GraphicsContext3D::reshape is clearing using current clear color instead of transparent + https://bugs.webkit.org/show_bug.cgi?id=44064 + + * src/WebGraphicsContext3DDefaultImpl.cpp: + (WebKit::WebGraphicsContext3DDefaultImpl::reshape): Use 0 as clear values. + +2010-11-19 Tony Chang <tony@chromium.org> + + Unreviewed, updating Chromium DEPS to try and fix the chromium win build. + + * DEPS: r66792 + +2010-11-19 Tony Chang <tony@chromium.org> + + Reviewed by Kent Tamura. + + [chromium] Enable webkit's TestNetscapePlugIn for DRT on win and linux + https://bugs.webkit.org/show_bug.cgi?id=49706 + + It is enabled simply by copying the plugin into + {Debug,Release}/plugins. This change also rolls in a version of + Chromium that disables the old plugin. + + * WebKit.gyp: + +2010-11-19 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r72399. + http://trac.webkit.org/changeset/72399 + https://bugs.webkit.org/show_bug.cgi?id=49805 + + Broke Chromium build (Requested by antonm_ on #webkit). + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::popupOpened): + * src/ChromeClientImpl.h: + +2010-11-19 Jay Civelli <jcivelli@chromium.org> + + Reviewed by David Levin. + + Removing unused code to show popup externally on Mac. + https://bugs.webkit.org/show_bug.cgi?id=49747 + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::popupOpened): + * src/ChromeClientImpl.h: + +2010-11-19 Pavel Feldman <pfeldman@chromium.org> + + Not reviewed: flip chromium version to mitigate two-sided patch impact. + + * DEPS: + +2010-11-18 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: provide response code and status text as a part + of raw headers data. + https://bugs.webkit.org/show_bug.cgi?id=49668 + + * WebKit.gyp: + * public/WebHTTPLoadInfo.h: Renamed from WebKit/chromium/public/WebResourceRawHeaders.h. + (WebKit::WebHTTPLoadInfo::WebHTTPLoadInfo): + (WebKit::WebHTTPLoadInfo::~WebHTTPLoadInfo): + (WebKit::WebHTTPLoadInfo::operator =): + * public/WebURLResponse.h: + * src/WebHTTPLoadInfo.cpp: Renamed from WebKit/chromium/src/WebResourceRawHeaders.cpp. + (WebKit::WebHTTPLoadInfo::initialize): + (WebKit::WebHTTPLoadInfo::reset): + (WebKit::WebHTTPLoadInfo::assign): + (WebKit::WebHTTPLoadInfo::WebHTTPLoadInfo): + (WebKit::WebHTTPLoadInfo::operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>): + (WebKit::WebHTTPLoadInfo::responseCode): + (WebKit::WebHTTPLoadInfo::setResponseCode): + (WebKit::WebHTTPLoadInfo::statusText): + (WebKit::WebHTTPLoadInfo::setStatusText): + (WebKit::addHeader): + (WebKit::WebHTTPLoadInfo::addRequestHeader): + (WebKit::WebHTTPLoadInfo::addResponseHeader): + * src/WebURLResponse.cpp: + (WebKit::WebURLResponse::httpLoadInfo): + (WebKit::WebURLResponse::setHTTPLoadInfo): + +2010-11-18 Kent Tamura <tkent@chromium.org> + + Reviewed by Tony Chang. + + Add more validation message functions + https://bugs.webkit.org/show_bug.cgi?id=49716 + + Add implementations of new functions and symbols for new messages. + + * public/WebLocalizedString.h: + * src/LocalizedStrings.cpp: + (WebCore::validationMessageValueMissingForCheckboxText): + (WebCore::validationMessageValueMissingForFileText): + (WebCore::validationMessageValueMissingForMultipleFileText): + (WebCore::validationMessageValueMissingForRadioText): + (WebCore::validationMessageValueMissingForSelectText): + +2010-11-18 Tony Chang <tony@chromium.org> + + Unreviewed, fix chromium compile. We need ipc and openssl now. + + * DEPS: + +2010-11-18 James Robinson <jamesr@chromium.org> + + Reviewed by David Levin. + + [chromium] Update chromium DEPS to r66658 to pick up skia roll + https://bugs.webkit.org/show_bug.cgi?id=49754 + + * DEPS: + +2010-11-18 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] IndexedDB API cleanup + https://bugs.webkit.org/show_bug.cgi?id=49733 + + Make it so that you can't directly instantiate our "interface" + classes. Remove some code for 2 sided merges. + + * public/WebIDBCursor.h: + (WebKit::WebIDBCursor::WebIDBCursor): + * public/WebIDBDatabase.h: + (WebKit::WebIDBDatabase::WebIDBDatabase): + * public/WebIDBIndex.h: + (WebKit::WebIDBIndex::WebIDBIndex): + * public/WebIDBObjectStore.h: + (WebKit::WebIDBObjectStore::WebIDBObjectStore): + * public/WebIDBTransaction.h: + (WebKit::WebIDBTransaction::WebIDBTransaction): + * src/IDBTransactionBackendProxy.cpp: + (WebCore::IDBTransactionBackendProxy::IDBTransactionBackendProxy): + +2010-11-18 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Yury Semikhatsky. + + Chrome DevTools: minify front-end JavaScript. + https://bugs.webkit.org/show_bug.cgi?id=49657 + + * scripts/concatenate_js_files.py: + * scripts/jsmin.py: Added. + +2010-11-18 Chris Rogers <crogers@google.com> + + Reviewed by Dimitri Glazkov. + + Add loadPlatformAudioResource() and decodeAudioFileData() to ChromiumBridge + https://bugs.webkit.org/show_bug.cgi?id=49557 + + * WebKit.gyp: + * public/WebAudioBus.h: Added. + (WebKit::WebAudioBus::WebAudioBus): + * public/WebKitClient.h: + (WebKit::WebKitClient::decodeAudioFileData): + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::loadPlatformAudioResource): + (WebCore::ChromiumBridge::decodeAudioFileData): + * src/WebAudioBus.cpp: Added. + (WebKit::WebAudioBus::~WebAudioBus): + (WebKit::WebAudioBus::initialize): + (WebKit::WebAudioBus::numberOfChannels): + (WebKit::WebAudioBus::length): + (WebKit::WebAudioBus::sampleRate): + (WebKit::WebAudioBus::channelData): + (WebKit::WebAudioBus::release): + 2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r72228. diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS index f5d56dd..ad0ad75 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': '65502' + 'chromium_rev': '67811' } deps = { @@ -87,6 +87,8 @@ deps = { Var('chromium_svn')+'/app@'+Var('chromium_rev'), # needed by appcache 'gpu': Var('chromium_svn')+'/gpu@'+Var('chromium_rev'), + 'ipc': + Var('chromium_svn')+'/ipc@'+Var('chromium_rev'), 'media': Var('chromium_svn')+'/media@'+Var('chromium_rev'), 'printing': @@ -107,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': @@ -129,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'), }, @@ -139,8 +138,8 @@ 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 a95b88f..01bb092 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -109,6 +109,7 @@ 'public/WebApplicationCacheHost.h', 'public/WebApplicationCacheHostClient.h', 'public/WebAttribute.h', + 'public/WebAudioBus.h', 'public/WebBindings.h', 'public/WebBlobData.h', 'public/WebBlobRegistry.h', @@ -172,6 +173,8 @@ 'public/WebFontCache.h', 'public/WebFormControlElement.h', 'public/WebFormElement.h', + 'public/WebGeolocationError.h', + 'public/WebGeolocationPosition.h', 'public/WebGeolocationService.h', 'public/WebGeolocationServiceBridge.h', 'public/WebGeolocationServiceMock.h', @@ -179,6 +182,7 @@ 'public/WebGraphicsContext3D.h', 'public/WebHistoryItem.h', 'public/WebHTTPBody.h', + 'public/WebHTTPLoadInfo.h', 'public/WebImage.h', 'public/WebImageDecoder.h', 'public/WebIDBCallbacks.h', @@ -235,7 +239,6 @@ 'public/WebRange.h', 'public/WebRect.h', 'public/WebRegularExpression.h', - 'public/WebResourceRawHeaders.h', 'public/WebRuntimeFeatures.h', 'public/WebScrollbar.h', 'public/WebScrollbarClient.h', @@ -289,6 +292,8 @@ 'src/ApplicationCacheHost.cpp', 'src/ApplicationCacheHostInternal.h', 'src/AssertMatchingEnums.cpp', + 'src/AssociatedURLLoader.cpp', + 'src/AssociatedURLLoader.h', 'src/AsyncFileSystemChromium.cpp', 'src/AsyncFileSystemChromium.h', 'src/AsyncFileWriterChromium.cpp', @@ -394,6 +399,7 @@ 'src/WebAnimationControllerImpl.cpp', 'src/WebAnimationControllerImpl.h', 'src/WebAttribute.cpp', + 'src/WebAudioBus.cpp', 'src/WebBindings.cpp', 'src/WebBlobData.cpp', 'src/WebCache.cpp', @@ -438,6 +444,8 @@ 'src/WebFormElement.cpp', 'src/WebFrameImpl.cpp', 'src/WebFrameImpl.h', + 'src/WebGeolocationError.cpp', + 'src/WebGeolocationPosition.cpp', 'src/WebGeolocationServiceBridgeImpl.cpp', 'src/WebGeolocationServiceBridgeImpl.h', 'src/WebGeolocationServiceMock.cpp', @@ -447,6 +455,7 @@ 'src/WebGraphicsContext3DDefaultImpl.h', 'src/WebHistoryItem.cpp', 'src/WebHTTPBody.cpp', + 'src/WebHTTPLoadInfo.cpp', 'src/WebIDBCallbacksImpl.cpp', 'src/WebIDBCallbacksImpl.h', 'src/WebIDBCursorImpl.cpp', @@ -454,7 +463,6 @@ 'src/WebIDBDatabaseError.cpp', 'src/WebIDBDatabaseImpl.cpp', 'src/WebIDBDatabaseImpl.h', - 'src/WebIDBFactory.cpp', 'src/WebIDBFactoryImpl.cpp', 'src/WebIDBFactoryImpl.h', 'src/WebIDBIndexImpl.cpp', @@ -504,7 +512,6 @@ 'src/WebPopupMenuImpl.h', 'src/WebRange.cpp', 'src/WebRegularExpression.cpp', - 'src/WebResourceRawHeaders.cpp', 'src/WebRuntimeFeatures.cpp', 'src/WebScriptController.cpp', 'src/WebScrollbarImpl.cpp', @@ -662,6 +669,11 @@ ['exclude', 'WebGeolocationService.*$'], ['include', 'WebGeolocationServiceMock.*'], ], + }, { + 'sources/': [ + ['exclude', 'WebGeolocationError.*'], + ['exclude', 'WebGeolocationPosition.*'], + ], }] ], }, @@ -867,6 +879,7 @@ 'ImageDiff', 'inspector_resources', 'TestNetscapePlugIn', + 'copy_TestNetscapePlugIn', 'webkit', '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config', '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc', @@ -974,20 +987,11 @@ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf', '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png', ], - # Workaround for http://code.google.com/p/gyp/issues/detail?id=160 - 'copies': [{ - 'destination': '<(PRODUCT_DIR)/plugins/', - 'files': ['<(PRODUCT_DIR)/WebKitTestNetscapePlugIn.plugin/'], - }], },{ # OS!="mac" 'sources/': [ # .mm is already excluded by common.gypi ['exclude', 'Mac\\.cpp$'], ], - 'dependencies': [ - # FIXME: Switch to webkit.org's plugin. - '<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin', - ], }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 'dependencies': [ @@ -1078,6 +1082,33 @@ }], ], }, + { + 'target_name': 'copy_TestNetscapePlugIn', + 'type': 'none', + 'dependencies': [ + 'TestNetscapePlugIn', + ], + 'conditions': [ + ['OS=="win"', { + 'copies': [{ + 'destination': '<(PRODUCT_DIR)/plugins', + 'files': ['<(PRODUCT_DIR)/npTestNetscapePlugIn.dll'], + }], + }], + ['OS=="mac"', { + 'copies': [{ + 'destination': '<(PRODUCT_DIR)/plugins/', + 'files': ['<(PRODUCT_DIR)/WebKitTestNetscapePlugIn.plugin/'], + }], + }], + ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { + 'copies': [{ + 'destination': '<(PRODUCT_DIR)/plugins', + 'files': ['<(PRODUCT_DIR)/libTestNetscapePlugIn.so'], + }], + }], + ], + }, ], # targets 'conditions': [ ['OS=="win"', { diff --git a/WebKit/chromium/public/WebAudioBus.h b/WebKit/chromium/public/WebAudioBus.h new file mode 100644 index 0000000..94ef74d --- /dev/null +++ b/WebKit/chromium/public/WebAudioBus.h @@ -0,0 +1,69 @@ +/* + * 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 INC. 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 INC. 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 WebAudioBus_h +#define WebAudioBus_h + +#include "WebCommon.h" + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class AudioBus; } +namespace WTF { template <typename T> class PassOwnPtr; } +#endif + +namespace WebKit { + +class WebAudioBusPrivate; + +// A container for multi-channel linear PCM audio data. +// +// WARNING: It is not safe to pass a WebAudioBus across threads!!! +// +class WebAudioBus { +public: + WebAudioBus() : m_private(0) { } + ~WebAudioBus(); + + // initialize() allocates memory of the given length for the given number of channels. + void initialize(unsigned numberOfChannels, size_t length, double sampleRate); + + WEBKIT_API unsigned numberOfChannels() const; + WEBKIT_API size_t length() const; + WEBKIT_API double sampleRate() const; + + WEBKIT_API float* channelData(unsigned channelIndex); + +#if WEBKIT_IMPLEMENTATION + WTF::PassOwnPtr<WebCore::AudioBus> release(); +#endif + +private: + // Noncopyable + WebAudioBus(const WebAudioBus& d) : m_private(0) { } + WebAudioBusPrivate* m_private; +}; + +} // namespace WebKit + +#endif // WebAudioBus_h 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/WebFrame.h b/WebKit/chromium/public/WebFrame.h index 8f2c861..30bf03b 100644 --- a/WebKit/chromium/public/WebFrame.h +++ b/WebKit/chromium/public/WebFrame.h @@ -61,6 +61,7 @@ class WebRange; class WebSecurityOrigin; class WebString; class WebURL; +class WebURLLoader; class WebURLRequest; class WebView; struct WebConsoleMessage; @@ -327,8 +328,14 @@ public: // Called to associate the WebURLRequest with this frame. The request // will be modified to inherit parameters that allow it to be loaded. // This method ends up triggering WebFrameClient::willSendRequest. + // DEPRECATED: Please use createAssociatedURLLoader instead. virtual void dispatchWillSendRequest(WebURLRequest&) = 0; + // Returns a WebURLLoader that is associated with this frame. The loader + // will, for example, be cancelled when WebFrame::stopLoading is called. + // FIXME: stopLoading does not yet cancel an associated loader!! + virtual WebURLLoader* createAssociatedURLLoader() = 0; + // Called from within WebFrameClient::didReceiveDocumentData to commit // data for the frame that will be used to construct the frame's // document. 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/WebGeolocationError.h b/WebKit/chromium/public/WebGeolocationError.h new file mode 100644 index 0000000..e9354d3 --- /dev/null +++ b/WebKit/chromium/public/WebGeolocationError.h @@ -0,0 +1,68 @@ +/* + * 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 WebGeolocationError_h +#define WebGeolocationError_h + +#include "WebCommon.h" +#include "WebPrivatePtr.h" + +#if WEBKIT_IMPLEMENTATION +#include <wtf/PassRefPtr.h> +namespace WebCore { class GeolocationError; } +#endif + +namespace WebKit { + +class WebString; + +class WebGeolocationError { +public: + enum Error { + ErrorPermissionDenied, + ErrorPositionUnavailable + }; + + WebGeolocationError(Error code, const WebString& message) { assign(code, message); } + WebGeolocationError(const WebGeolocationError& other) { assign(other); } + ~WebGeolocationError() { reset(); } + + WEBKIT_API void assign(Error code, const WebString& message); + WEBKIT_API void assign(const WebGeolocationError&); + WEBKIT_API void reset(); + +#if WEBKIT_IMPLEMENTATION + WebGeolocationError(WTF::PassRefPtr<WebCore::GeolocationError>); + WebGeolocationError& operator=(WTF::PassRefPtr<WebCore::GeolocationError>); + operator WTF::PassRefPtr<WebCore::GeolocationError>() const; +#endif + +private: + WebPrivatePtr<WebCore::GeolocationError> m_private; +}; + +} // namespace WebKit + +#endif // WebGeolocationError_h diff --git a/WebKit/chromium/public/WebGeolocationPosition.h b/WebKit/chromium/public/WebGeolocationPosition.h new file mode 100644 index 0000000..de73431 --- /dev/null +++ b/WebKit/chromium/public/WebGeolocationPosition.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 WebGeolocationPosition_h +#define WebGeolocationPosition_h + +#include "WebCommon.h" +#include "WebPrivatePtr.h" + +#if WEBKIT_IMPLEMENTATION +#include <wtf/PassRefPtr.h> +namespace WebCore { class GeolocationPosition; } +#endif + +namespace WebKit { + +class WebGeolocationPosition { +public: + WebGeolocationPosition() {} + WebGeolocationPosition(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) + { + assign(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed); + } + WebGeolocationPosition(const WebGeolocationPosition& other) { assign(other); } + ~WebGeolocationPosition() { reset(); } + + WEBKIT_API void assign(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed); + WEBKIT_API void assign(const WebGeolocationPosition&); + WEBKIT_API void reset(); + +#if WEBKIT_IMPLEMENTATION + WebGeolocationPosition(WTF::PassRefPtr<WebCore::GeolocationPosition>); + WebGeolocationPosition& operator=(WTF::PassRefPtr<WebCore::GeolocationPosition>); + operator WTF::PassRefPtr<WebCore::GeolocationPosition>() const; +#endif + +private: + WebPrivatePtr<WebCore::GeolocationPosition> m_private; +}; + +} // namespace WebKit + +#endif // WebGeolocationPosition_h diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h index 932004c..05c164a 100644 --- a/WebKit/chromium/public/WebGraphicsContext3D.h +++ b/WebKit/chromium/public/WebGraphicsContext3D.h @@ -203,6 +203,8 @@ public: virtual unsigned long getError() = 0; + virtual bool isContextLost() = 0; + virtual void getFloatv(unsigned long pname, float* value) = 0; virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value) = 0; diff --git a/WebKit/chromium/public/WebResourceRawHeaders.h b/WebKit/chromium/public/WebHTTPLoadInfo.h index b91e68b..9ff9153 100644 --- a/WebKit/chromium/public/WebResourceRawHeaders.h +++ b/WebKit/chromium/public/WebHTTPLoadInfo.h @@ -28,27 +28,25 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebResourceRawHeaders_h -#define WebResourceRawHeaders_h +#ifndef WebHTTPLoadInfo_h +#define WebHTTPLoadInfo_h #include "WebCommon.h" #include "WebPrivatePtr.h" namespace WebCore { -struct ResourceRawHeaders; +struct ResourceLoadInfo; } namespace WebKit { -class WebHTTPHeaderVisitor; -class WebResourceRawHeadersMapPrivate; class WebString; -class WebResourceRawHeaders { +class WebHTTPLoadInfo { public: - WebResourceRawHeaders() { initialize(); } - ~WebResourceRawHeaders() { reset(); } - WebResourceRawHeaders(const WebResourceRawHeaders& r) { assign(r); } - WebResourceRawHeaders& operator =(const WebResourceRawHeaders& r) + WebHTTPLoadInfo() { initialize(); } + ~WebHTTPLoadInfo() { reset(); } + WebHTTPLoadInfo(const WebHTTPLoadInfo& r) { assign(r); } + WebHTTPLoadInfo& operator =(const WebHTTPLoadInfo& r) { assign(r); return *this; @@ -56,17 +54,24 @@ public: WEBKIT_API void initialize(); WEBKIT_API void reset(); - WEBKIT_API void assign(const WebResourceRawHeaders& r); + WEBKIT_API void assign(const WebHTTPLoadInfo& r); + + WEBKIT_API int httpStatusCode() const; + WEBKIT_API void setHTTPStatusCode(int); + + WEBKIT_API WebString httpStatusText() const; + WEBKIT_API void setHTTPStatusText(const WebString&); + WEBKIT_API void addRequestHeader(const WebString& name, const WebString& value); WEBKIT_API void addResponseHeader(const WebString& name, const WebString& value); #if WEBKIT_IMPLEMENTATION - WebResourceRawHeaders(WTF::PassRefPtr<WebCore::ResourceRawHeaders>); - operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>() const; + WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo>); + operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const; #endif private: - WebPrivatePtr<WebCore::ResourceRawHeaders> m_private; + WebPrivatePtr<WebCore::ResourceLoadInfo> m_private; }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBCursor.h b/WebKit/chromium/public/WebIDBCursor.h index 98f7a6b..88b8b22 100644 --- a/WebKit/chromium/public/WebIDBCursor.h +++ b/WebKit/chromium/public/WebIDBCursor.h @@ -56,6 +56,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(); } + +protected: + WebIDBCursor() { } }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h index 19096cc..1588e23 100644 --- a/WebKit/chromium/public/WebIDBDatabase.h +++ b/WebKit/chromium/public/WebIDBDatabase.h @@ -47,9 +47,9 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return WebString(); } + // FIXME: remove after roll. virtual WebString description() const { - WEBKIT_ASSERT_NOT_REACHED(); return WebString(); } virtual WebString version() const @@ -57,18 +57,16 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return WebString(); } - virtual WebDOMStringList objectStores() const - { - WEBKIT_ASSERT_NOT_REACHED(); - 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 removeObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } + 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 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&) @@ -77,6 +75,9 @@ public: return 0; } virtual void close() { WEBKIT_ASSERT_NOT_REACHED(); } + +protected: + WebIDBDatabase() { } }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h index 66ceadb..5e3337e 100755 --- a/WebKit/chromium/public/WebIDBFactory.h +++ b/WebKit/chromium/public/WebIDBFactory.h @@ -51,16 +51,18 @@ public: virtual ~WebIDBFactory() { } - // The WebKit implementation of open ignores the WebFrame* parameter. + // 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) { - WEBKIT_ASSERT_NOT_REACHED(); + open(name, callbacks, origin, webFrame, dataDir, maximumSize); } - // The file name that would be used for persisting a given indexed database on the file system. - WEBKIT_API static WebString databaseFileName(const WebSecurityOrigin&); - // FIXME: Remove after roll. - WEBKIT_API static WebString databaseFileName(const WebString& name, const WebSecurityOrigin&); + // 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); + } }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBIndex.h b/WebKit/chromium/public/WebIDBIndex.h index 0c0d79a..3c07a50 100644 --- a/WebKit/chromium/public/WebIDBIndex.h +++ b/WebKit/chromium/public/WebIDBIndex.h @@ -62,49 +62,13 @@ public: return false; } - virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&) - { - WebExceptionCode ec = 0; - openObjectCursor(range, direction, callbacks, transaction, ec); - } - virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction) - { - openObjectCursor(range, direction, callbacks, transaction); - } - virtual void openKeyCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&) - { - WebExceptionCode ec = 0; - openKeyCursor(range, direction, callbacks, transaction, ec); - } - virtual void openKeyCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction) - { - openKeyCursor(range, direction, callbacks, transaction); - } - virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&) - { - WebExceptionCode ec = 0; - getObject(key, callbacks, transaction, ec); - } - virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction) - { - getObject(key, callbacks, transaction); - } - virtual void getKey(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&) - { - WebExceptionCode ec = 0; - getKey(key, callbacks, transaction, ec); - } - virtual void getKey(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction) - { - getKey(key, callbacks, transaction); - } - - /* virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - */ + +protected: + WebIDBIndex() {} }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBKeyRange.h b/WebKit/chromium/public/WebIDBKeyRange.h index 82953ce..6a9c6da 100644 --- a/WebKit/chromium/public/WebIDBKeyRange.h +++ b/WebKit/chromium/public/WebIDBKeyRange.h @@ -41,14 +41,22 @@ public: ~WebIDBKeyRange() { reset(); } WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); } - WebIDBKeyRange(const WebIDBKey& left, const WebIDBKey& right, unsigned short flags) { assign(left, right, flags); } + 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 unsigned short flags() const; + + WEBKIT_API WebIDBKey lower() const; + WEBKIT_API WebIDBKey upper() const; + WEBKIT_API bool lowerOpen() const; + WEBKIT_API bool upperOpen() const; WEBKIT_API void assign(const WebIDBKeyRange&); - WEBKIT_API void assign(const WebIDBKey& left, const WebIDBKey& right, unsigned short flags); + WEBKIT_API void assign(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen); WEBKIT_API void reset(); #if WEBKIT_IMPLEMENTATION diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h index 89dae02..17562ca 100755 --- a/WebKit/chromium/public/WebIDBObjectStore.h +++ b/WebKit/chromium/public/WebIDBObjectStore.h @@ -61,7 +61,9 @@ 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(); } - virtual void remove(const WebIDBKey&, 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 WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); @@ -73,8 +75,11 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return 0; } - virtual void removeIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } + virtual void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } + +protected: + WebIDBObjectStore() {} }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebIDBTransaction.h b/WebKit/chromium/public/WebIDBTransaction.h index cff7c67..74919a8 100644 --- a/WebKit/chromium/public/WebIDBTransaction.h +++ b/WebKit/chromium/public/WebIDBTransaction.h @@ -26,6 +26,7 @@ #ifndef WebIDBTransaction_h #define WebIDBTransaction_h +#include "WebExceptionCode.h" #include "WebString.h" namespace WebCore { class IDBTransactionBackendInterface; } @@ -45,7 +46,7 @@ public: WEBKIT_ASSERT_NOT_REACHED(); return 0; } - virtual WebIDBObjectStore* objectStore(const WebString& name) + virtual WebIDBObjectStore* objectStore(const WebString& name, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); return 0; @@ -60,6 +61,8 @@ public: return 0; } +protected: + WebIDBTransaction() {} }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h index 0c0764c..3dd7e40 100644 --- a/WebKit/chromium/public/WebInputElement.h +++ b/WebKit/chromium/public/WebInputElement.h @@ -80,6 +80,9 @@ namespace WebKit { WEBKIT_API int selectionEnd() const; WEBKIT_API bool isValidValue(const WebString&) const; + // Exposes the default value of the maxLength attribute. + WEBKIT_API static const int defaultMaxLength; + #if WEBKIT_IMPLEMENTATION WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index 7ced7ad..0c4020f 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -31,6 +31,7 @@ #ifndef WebKitClient_h #define WebKitClient_h +#include "WebAudioBus.h" #include "WebCommon.h" #include "WebData.h" #include "WebLocalizedString.h" @@ -220,10 +221,15 @@ public: // Returns a blob of data corresponding to the named resource. virtual WebData loadResource(const char* name) { return WebData(); } - // Returns a localized string resource (with an optional numeric - // parameter value). + // 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; } + + // 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/WebLocalizedString.h b/WebKit/chromium/public/WebLocalizedString.h index 8ab5f8d..598e972 100644 --- a/WebKit/chromium/public/WebLocalizedString.h +++ b/WebKit/chromium/public/WebLocalizedString.h @@ -59,6 +59,11 @@ struct WebLocalizedString { KeygenMenuHighGradeKeySize, KeygenMenuMediumGradeKeySize, ValidationValueMissing, + ValidationValueMissingForCheckbox, + ValidationValueMissingForFile, + ValidationValueMissingForMultipleFile, + ValidationValueMissingForRadio, + ValidationValueMissingForSelect, ValidationTypeMismatch, ValidationTypeMismatchForEmail, ValidationTypeMismatchForMultipleEmail, diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h index fa21551..0467c96 100644 --- a/WebKit/chromium/public/WebSettings.h +++ b/WebKit/chromium/public/WebSettings.h @@ -93,6 +93,11 @@ public: virtual void setShowDebugBorders(bool) = 0; virtual void setEditingBehavior(EditingBehavior) = 0; virtual void setAcceleratedCompositingEnabled(bool) = 0; + virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool) = 0; + virtual void setAcceleratedCompositingForVideoEnabled(bool) = 0; + virtual void setAcceleratedCompositingForCanvasEnabled(bool) = 0; + virtual void setAcceleratedCompositingForPluginsEnabled(bool) = 0; + virtual void setAcceleratedCompositingForAnimationEnabled(bool) = 0; virtual void setAccelerated2dCanvasEnabled(bool) = 0; virtual void setMemoryInfoEnabled(bool) = 0; virtual void setHyperlinkAuditingEnabled(bool) = 0; diff --git a/WebKit/chromium/public/WebSpeechInputControllerMock.h b/WebKit/chromium/public/WebSpeechInputControllerMock.h index 31672ba..e440b89 100644 --- a/WebKit/chromium/public/WebSpeechInputControllerMock.h +++ b/WebKit/chromium/public/WebSpeechInputControllerMock.h @@ -44,7 +44,7 @@ public: WebSpeechInputListener* listener); virtual ~WebSpeechInputControllerMock() { } - virtual void setMockRecognitionResult(const WebString& result, const WebString& language) = 0; + virtual void addMockRecognitionResult(const WebString& result, double confidence, const WebString& language) = 0; virtual void clearResults() = 0; }; diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h index f78c2db..c50f88e 100644 --- a/WebKit/chromium/public/WebURLResponse.h +++ b/WebKit/chromium/public/WebURLResponse.h @@ -42,7 +42,7 @@ namespace WebKit { class WebCString; class WebHTTPHeaderVisitor; -class WebResourceRawHeaders; +class WebHTTPLoadInfo; class WebString; class WebURL; class WebURLLoadTiming; @@ -84,8 +84,8 @@ public: WEBKIT_API WebURLLoadTiming loadTiming(); WEBKIT_API void setLoadTiming(const WebURLLoadTiming&); - WEBKIT_API WebResourceRawHeaders resourceRawHeaders(); - WEBKIT_API void setResourceRawHeaders(const WebResourceRawHeaders&); + WEBKIT_API WebHTTPLoadInfo httpLoadInfo(); + WEBKIT_API void setHTTPLoadInfo(const WebHTTPLoadInfo&); WEBKIT_API double responseTime() const; WEBKIT_API void setResponseTime(double); diff --git a/WebKit/chromium/scripts/concatenate_js_files.py b/WebKit/chromium/scripts/concatenate_js_files.py index 1393f48..209660a 100644 --- a/WebKit/chromium/scripts/concatenate_js_files.py +++ b/WebKit/chromium/scripts/concatenate_js_files.py @@ -34,6 +34,8 @@ from HTMLParser import HTMLParser from cStringIO import StringIO + +import jsmin import os.path import sys @@ -101,7 +103,7 @@ def main(argv): input_file.close() output_file = open(output_file_name, 'w') - output_file.write(output.getvalue()) + output_file.write(jsmin.jsmin(output.getvalue())) output_file.close() output.close() diff --git a/WebKit/chromium/scripts/jsmin.py b/WebKit/chromium/scripts/jsmin.py new file mode 100644 index 0000000..c2583a4 --- /dev/null +++ b/WebKit/chromium/scripts/jsmin.py @@ -0,0 +1,229 @@ +#!/usr/bin/python +# +# 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. +# +# This is a Python port of Douglas Crockford's jsmin.cc. See original +# copyright notice below. +# +# Copyright (c) 2002 Douglas Crockford (www.crockford.com) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +# of the Software, and to permit persons to whom the Software is furnished to do +# so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +from cStringIO import StringIO +import sys + + +class UnterminatedComment(Exception): + pass + + +class UnterminatedStringLiteral(Exception): + pass + + +class UnterminatedRegularExpression(Exception): + pass + + +EOF = '' + + +def jsmin(text): + minifier = JavaScriptMinifier() + minifier.input = StringIO(text) + minifier.output = StringIO() + minifier.jsmin() + return minifier.output.getvalue() + + +class JavaScriptMinifier(object): + + def isAlphanum(self, c): + """ return true if the character is a letter, digit, underscore, + dollar sign, or non-ASCII character. + """ + return ((c >= 'a' and c <= 'z') or (c >= '0' and c <= '9') or + (c >= 'A' and c <= 'Z') or c == '_' or c == '$' or c == '\\' or + c > 126) + + def get(self): + """ return the next character from stdin. Watch out for lookahead. If + the character is a control character, translate it to a space or + linefeed. + """ + c = self.theLookahead + self.theLookahead = EOF + if c == EOF: + c = self.input.read(1) + if c >= ' ' or c == '\n' or c == EOF: + return c + if c == '\r': + return '\n' + return ' ' + + def peek(self): + """ get the next character without getting it. """ + self.theLookahead = self.get() + return self.theLookahead + + def next(self): + """ get the next character, excluding comments. peek() is used to see + if a '/' is followed by a '/' or '*'. + """ + c = self.get() + if c == '/': + peek = self.peek() + if peek == '/': + while True: + c = self.get() + if c <= '\n': + return c + elif peek == '*': + self.get() + while True: + get = self.get() + if get == '*': + if self.peek() == '/': + self.get() + return ' ' + elif get == EOF: + raise UnterminatedComment() + else: + return c + return c + + def putc(self, c): + self.output.write(c) + + def action(self, d): + """ do something! What you do is determined by the argument: + 1 Output A. Copy B to A. Get the next B. + 2 Copy B to A. Get the next B. (Delete A). + 3 Get the next B. (Delete B). + action treats a string as a single character. Wow! + action recognizes a regular expression if it is preceded by ( or , or =. + """ + if d <= 1: + self.putc(self.theA) + if d <= 2: + self.theA = self.theB + if self.theA == '\'' or self.theA == '"': + while True: + self.putc(self.theA) + self.theA = self.get() + if self.theA == self.theB: + break + if self.theA == '\\': + self.putc(self.theA) + self.theA = self.get() + if self.theA == EOF: + raise UnterminatedString() + if d <= 3: + self.theB = self.next() + if self.theB == '/' and self.theA in ['(', ',', '=', ':', '[', '!', '&', '|', '?', '{', '}', ';', '\n']: + self.putc(self.theA) + self.putc(self.theB) + while True: + self.theA = self.get() + if self.theA == '/': + break + if self.theA == '\\': + self.putc(self.theA) + self.theA = self.get() + if self.theA == EOF: + raise UnterminatedRegularExpression() + self.putc(self.theA) + self.theB = self.next() + + def jsmin(self): + """ Copy the input to the output, deleting the characters which are + insignificant to JavaScript. Comments will be removed. Tabs will be + replaced with spaces. Carriage returns will be replaced with linefeeds. + Most spaces and linefeeds will be removed. + """ + self.theA = '\n' + self.theLookahead = EOF + self.action(3) + while self.theA != EOF: + if self.theA == ' ': + if self.isAlphanum(self.theB): + self.action(1) + else: + self.action(2) + elif self.theA == '\n': + if self.theB in ['{', '[', '(', '+', '-']: + self.action(1) + elif self.theB == ' ': + self.action(3) + else: + if self.isAlphanum(self.theB): + self.action(1) + else: + self.action(2) + else: + if self.theB == ' ': + if self.isAlphanum(self.theA): + self.action(1) + else: + self.action(3) + elif self.theB == '\n': + if self.theA in ['}', ']', ')', '+', '-', '"', '\'']: + self.action(1) + else: + if self.isAlphanum(self.theA): + self.action(1) + else: + self.action(3) + else: + self.action(1) + + +if __name__ == '__main__': + minifier = JavaScriptMinifier() + minifier.input = sys.stdin + minifier.output = sys.stdout + minifier.jsmin() + sys.stdin.close() diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp index 3fffd60..ceeed8d 100644 --- a/WebKit/chromium/src/AssertMatchingEnums.cpp +++ b/WebKit/chromium/src/AssertMatchingEnums.cpp @@ -41,6 +41,8 @@ #include "FileMetadata.h" #include "FontDescription.h" #include "FontSmoothingMode.h" +#include "GeolocationError.h" +#include "GeolocationPosition.h" #include "HTMLInputElement.h" #include "IDBKey.h" #include "MediaPlayer.h" @@ -62,6 +64,8 @@ #include "WebFileInfo.h" #include "WebFileSystem.h" #include "WebFontDescription.h" +#include "WebGeolocationError.h" +#include "WebGeolocationPosition.h" #include "WebIDBKey.h" #include "WebInputElement.h" #include "WebMediaPlayer.h" @@ -383,3 +387,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorInvalidModification, FileError::INVALID COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorQuotaExceeded, FileError::QUOTA_EXCEEDED_ERR); COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorTypeMismatch, FileError::TYPE_MISMATCH_ERR); COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR); + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, GeolocationError::PermissionDenied); +COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable); +#endif diff --git a/WebKit/chromium/src/AssociatedURLLoader.cpp b/WebKit/chromium/src/AssociatedURLLoader.cpp new file mode 100644 index 0000000..f494a0e --- /dev/null +++ b/WebKit/chromium/src/AssociatedURLLoader.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "AssociatedURLLoader.h" + +#include "WebApplicationCacheHost.h" +#include "WebDataSource.h" +#include "WebFrameImpl.h" +#include "WebKit.h" +#include "WebKitClient.h" +#include "WebURLRequest.h" + +namespace WebKit { + +AssociatedURLLoader::AssociatedURLLoader(PassRefPtr<WebFrameImpl> frameImpl) + : m_frameImpl(frameImpl), + m_realLoader(webKitClient()->createURLLoader()) +{ +} + +AssociatedURLLoader::~AssociatedURLLoader() +{ +} + +void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURLResponse& response, WebURLError& error, WebData& data) +{ + WebURLRequest requestCopy(request); + prepareRequest(requestCopy); + + m_realLoader->loadSynchronously(requestCopy, response, error, data); +} + +void AssociatedURLLoader::loadAsynchronously(const WebURLRequest& request, WebURLLoaderClient* client) +{ + WebURLRequest requestCopy(request); + prepareRequest(requestCopy); + + m_realLoader->loadAsynchronously(requestCopy, client); +} + +void AssociatedURLLoader::cancel() +{ + m_realLoader->cancel(); +} + +void AssociatedURLLoader::setDefersLoading(bool defersLoading) +{ + m_realLoader->setDefersLoading(defersLoading); +} + +void AssociatedURLLoader::prepareRequest(WebURLRequest& request) +{ + WebApplicationCacheHost* applicationCacheHost = m_frameImpl->dataSource()->applicationCacheHost(); + if (applicationCacheHost) + applicationCacheHost->willStartSubResourceRequest(request); + m_frameImpl->dispatchWillSendRequest(request); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebIDBFactory.cpp b/WebKit/chromium/src/AssociatedURLLoader.h index 40eff97..4c9f54e 100755..100644 --- a/WebKit/chromium/src/WebIDBFactory.cpp +++ b/WebKit/chromium/src/AssociatedURLLoader.h @@ -28,26 +28,37 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "config.h" -#include "WebIDBFactory.h" +#ifndef AssociatedURLLoader_h +#define AssociatedURLLoader_h -#include "IDBFactoryBackendImpl.h" -#include "WebSecurityOrigin.h" -#include <wtf/UnusedParam.h> - -using namespace WebCore; +#include "WebURLLoader.h" +#include <wtf/OwnPtr.h> +#include <wtf/RefPtr.h> namespace WebKit { -WebString WebIDBFactory::databaseFileName(const WebSecurityOrigin& origin) -{ - return IDBFactoryBackendImpl::databaseFileName(origin.get()); -} +class WebFrameImpl; + +// This class is used to implement WebFrame::createAssociatedURLLoader. +// FIXME: Implement in terms of WebCore::SubresourceLoader. +class AssociatedURLLoader : public WebURLLoader { +public: + AssociatedURLLoader(PassRefPtr<WebFrameImpl>); + ~AssociatedURLLoader(); + + // WebURLLoader methods: + virtual void loadSynchronously(const WebURLRequest&, WebURLResponse&, WebURLError&, WebData&); + virtual void loadAsynchronously(const WebURLRequest&, WebURLLoaderClient*); + virtual void cancel(); + virtual void setDefersLoading(bool); + +private: + void prepareRequest(WebURLRequest&); + + RefPtr<WebFrameImpl> m_frameImpl; + OwnPtr<WebURLLoader> m_realLoader; +}; -WebString WebIDBFactory::databaseFileName(const WebString& name, const WebSecurityOrigin& origin) -{ - UNUSED_PARAM(name); - return databaseFileName(origin); -} +} // namespace WebKit -} +#endif diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp index c43a0b0..7b67ede 100644 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/WebKit/chromium/src/ChromeClientImpl.cpp @@ -61,6 +61,7 @@ #include "ScriptController.h" #include "SearchPopupMenuChromium.h" #include "SecurityOrigin.h" +#include "Settings.h" #if USE(V8) #include "V8Proxy.h" #endif @@ -807,9 +808,25 @@ void ChromeClientImpl::scheduleCompositingLayerSync() m_webView->setRootLayerNeedsDisplay(); } -bool ChromeClientImpl::allowsAcceleratedCompositing() const +ChromeClient::CompositingTriggerFlags ChromeClientImpl::allowedCompositingTriggers() const { - return m_webView->allowsAcceleratedCompositing(); + if (!m_webView->allowsAcceleratedCompositing()) + return 0; + + CompositingTriggerFlags flags = 0; + Settings* settings = m_webView->page()->settings(); + if (settings->acceleratedCompositingFor3DTransformsEnabled()) + flags |= ThreeDTransformTrigger; + if (settings->acceleratedCompositingForVideoEnabled()) + flags |= VideoTrigger; + if (settings->acceleratedCompositingForPluginsEnabled()) + flags |= PluginTrigger; + if (settings->acceleratedCompositingForAnimationEnabled()) + flags |= AnimationTrigger; + if (settings->acceleratedCompositingForCanvasEnabled()) + flags |= CanvasTrigger; + + return flags; } #endif diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h index 87c1653..b024bc0 100644 --- a/WebKit/chromium/src/ChromeClientImpl.h +++ b/WebKit/chromium/src/ChromeClientImpl.h @@ -152,8 +152,7 @@ public: // to do an eager layout before the drawing. virtual void scheduleCompositingLayerSync(); - // Returns true if accelerated compositing is supported. - virtual bool allowsAcceleratedCompositing() const; + virtual CompositingTriggerFlags allowedCompositingTriggers() const; #endif virtual bool supportsFullscreenForNode(const WebCore::Node*); diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index 074c982..e7a1305 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -35,6 +35,7 @@ #include "Chrome.h" #include "ChromeClientImpl.h" +#include "WebAudioBus.h" #include "WebClipboard.h" #include "WebCookie.h" #include "WebCookieJar.h" @@ -133,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; @@ -621,6 +622,27 @@ PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name) return image; } +#if ENABLE(WEB_AUDIO) + +PassOwnPtr<AudioBus> ChromiumBridge::loadPlatformAudioResource(const char* name, double sampleRate) +{ + const WebData& resource = webKitClient()->loadResource(name); + if (resource.isEmpty()) + return 0; + + return decodeAudioFileData(resource.data(), resource.size(), sampleRate); +} + +PassOwnPtr<AudioBus> ChromiumBridge::decodeAudioFileData(const char* data, size_t size, double sampleRate) +{ + WebAudioBus webAudioBus; + if (webKitClient()->decodeAudioFileData(&webAudioBus, data, size, sampleRate)) + return webAudioBus.release(); + return 0; +} + +#endif // ENABLE(WEB_AUDIO) + // Sandbox -------------------------------------------------------------------- bool ChromiumBridge::sandboxEnabled() 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..a194399 100644 --- a/WebKit/chromium/src/EditorClientImpl.h +++ b/WebKit/chromium/src/EditorClientImpl.h @@ -107,6 +107,7 @@ 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); diff --git a/WebKit/chromium/src/Extensions3DChromium.cpp b/WebKit/chromium/src/Extensions3DChromium.cpp index c36040b..fe04986 100644 --- a/WebKit/chromium/src/Extensions3DChromium.cpp +++ b/WebKit/chromium/src/Extensions3DChromium.cpp @@ -50,8 +50,7 @@ bool Extensions3DChromium::supports(const String& name) int Extensions3DChromium::getGraphicsResetStatusARB() { - // FIXME: implement this in GraphicsContext3DInternal / WebGraphicsContext3DInternal. - return GraphicsContext3D::NO_ERROR; + return m_internal->isContextLost() ? static_cast<int>(Extensions3D::UNKNOWN_CONTEXT_RESET_ARB) : static_cast<int>(GraphicsContext3D::NO_ERROR); } void* Extensions3DChromium::mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access) diff --git a/WebKit/chromium/src/ExternalPopupMenu.cpp b/WebKit/chromium/src/ExternalPopupMenu.cpp index 0f208fb..f7f9862 100644 --- a/WebKit/chromium/src/ExternalPopupMenu.cpp +++ b/WebKit/chromium/src/ExternalPopupMenu.cpp @@ -65,6 +65,8 @@ void ExternalPopupMenu::show(const IntRect& rect, FrameView* v, int index) WebPopupMenuInfo info; getPopupMenuInfo(&info); + if (info.items.isEmpty()) + return; m_webExternalPopupMenu = m_webViewClient->createExternalPopupMenu(info, this); m_webExternalPopupMenu->show(v->contentsToWindow(rect)); diff --git a/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp index 8cfe8c0..cc0c5bc 100644 --- a/WebKit/chromium/src/GraphicsContext3DChromium.cpp +++ b/WebKit/chromium/src/GraphicsContext3DChromium.cpp @@ -246,6 +246,11 @@ void GraphicsContext3DInternal::reshape(int width, int height) #endif // PLATFORM(CG) } +bool GraphicsContext3DInternal::isContextLost() +{ + return m_impl->isContextLost(); +} + // Macros to assist in delegating from GraphicsContext3DInternal to // WebGraphicsContext3D. diff --git a/WebKit/chromium/src/GraphicsContext3DInternal.h b/WebKit/chromium/src/GraphicsContext3DInternal.h index 4453d28..220cbb8 100644 --- a/WebKit/chromium/src/GraphicsContext3DInternal.h +++ b/WebKit/chromium/src/GraphicsContext3DInternal.h @@ -140,6 +140,8 @@ public: unsigned long getError(); + bool isContextLost(); + void getFloatv(unsigned long pname, float* value); void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value); diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp index 4fecf1b..685f53c 100644 --- a/WebKit/chromium/src/IDBDatabaseProxy.cpp +++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp @@ -71,9 +71,9 @@ String IDBDatabaseProxy::version() const return m_webIDBDatabase->version(); } -PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStores() const +PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStoreNames() const { - return m_webIDBDatabase->objectStores(); + return m_webIDBDatabase->objectStoreNames(); } PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseProxy::createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) @@ -87,12 +87,12 @@ PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseProxy::createObjectStore(c return IDBObjectStoreProxy::create(objectStore); } -void IDBDatabaseProxy::removeObjectStore(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) +void IDBDatabaseProxy::deleteObjectStore(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) { // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, // all implementations of IDB interfaces are proxy objects. IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBDatabase->removeObjectStore(name, *transactionProxy->getWebIDBTransaction(), ec); + m_webIDBDatabase->deleteObjectStore(name, *transactionProxy->getWebIDBTransaction(), ec); } void IDBDatabaseProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec) @@ -104,6 +104,10 @@ PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStri { WebKit::WebDOMStringList names(storeNames); WebKit::WebIDBTransaction* transaction = m_webIDBDatabase->transaction(names, mode, timeout, ec); + if (!transaction) { + ASSERT(ec); + return 0; + } return IDBTransactionBackendProxy::create(transaction); } diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h index 5d20073..84693f2 100644 --- a/WebKit/chromium/src/IDBDatabaseProxy.h +++ b/WebKit/chromium/src/IDBDatabaseProxy.h @@ -45,10 +45,10 @@ public: virtual String name() const; virtual String description() const; virtual String version() const; - virtual PassRefPtr<DOMStringList> objectStores() const; + virtual PassRefPtr<DOMStringList> objectStoreNames() const; virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void removeObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&); + virtual void deleteObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&); virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, ExceptionCode&); virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode&); virtual void close(); diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp index 2e65246..67504a3 100755 --- a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp @@ -59,10 +59,10 @@ IDBFactoryBackendProxy::~IDBFactoryBackendProxy() { } -void IDBFactoryBackendProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, const String& dataDir, int64_t maximumSize) +void IDBFactoryBackendProxy::open(const String& name, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, const String& dataDir, int64_t maximumSize) { WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); - m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir, maximumSize); + m_webIDBFactory->open(name, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir, maximumSize); } } // namespace WebCore diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h index 0a55b59..5950a68 100755 --- a/WebKit/chromium/src/IDBFactoryBackendProxy.h +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h @@ -45,7 +45,7 @@ public: virtual ~IDBFactoryBackendProxy(); PassRefPtr<DOMStringList> databases(void) const; - virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir, int64_t maximumSize); + virtual void open(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir, int64_t maximumSize); private: IDBFactoryBackendProxy(); diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp index e537718..e03cdc8 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp +++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp @@ -88,12 +88,12 @@ void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPt m_webIDBObjectStore->put(value, key, addOnly, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); } -void IDBObjectStoreProxy::remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) +void IDBObjectStoreProxy::deleteFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) { // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, // all implementations of IDB interfaces are proxy objects. IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBObjectStore->remove(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); + m_webIDBObjectStore->deleteFunction(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); } PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) @@ -115,12 +115,12 @@ PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::index(const String& na return IDBIndexBackendProxy::create(index); } -void IDBObjectStoreProxy::removeIndex(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) +void IDBObjectStoreProxy::deleteIndex(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) { // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, // all implementations of IDB interfaces are proxy objects. IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBObjectStore->removeIndex(name, *transactionProxy->getWebIDBTransaction(), ec); + m_webIDBObjectStore->deleteIndex(name, *transactionProxy->getWebIDBTransaction(), ec); } void IDBObjectStoreProxy::openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h index 1e19279..348c794 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.h +++ b/WebKit/chromium/src/IDBObjectStoreProxy.h @@ -48,11 +48,11 @@ public: virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); virtual void put(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, bool addOnly, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void remove(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); + virtual void deleteFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); PassRefPtr<IDBIndexBackendInterface> createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface*, ExceptionCode&); PassRefPtr<IDBIndexBackendInterface> index(const String& name, ExceptionCode&); - void removeIndex(const String& name, IDBTransactionBackendInterface*, ExceptionCode&); + void deleteIndex(const String& name, IDBTransactionBackendInterface*, ExceptionCode&); virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp index 7a88b13..95c90d5 100644 --- a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp +++ b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp @@ -45,17 +45,16 @@ PassRefPtr<IDBTransactionBackendInterface> IDBTransactionBackendProxy::create(Pa IDBTransactionBackendProxy::IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction> transaction) : m_webIDBTransaction(transaction) { - if (!m_webIDBTransaction) - m_webIDBTransaction = adoptPtr(new WebKit::WebIDBTransaction()); + ASSERT(m_webIDBTransaction); } IDBTransactionBackendProxy::~IDBTransactionBackendProxy() { } -PassRefPtr<IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectStore(const String& name) +PassRefPtr<IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectStore(const String& name, ExceptionCode& ec) { - WebKit::WebIDBObjectStore* objectStore = m_webIDBTransaction->objectStore(name); + WebKit::WebIDBObjectStore* objectStore = m_webIDBTransaction->objectStore(name, ec); if (!objectStore) return 0; return IDBObjectStoreProxy::create(objectStore); diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.h b/WebKit/chromium/src/IDBTransactionBackendProxy.h index 0bf84da..96d7293 100644 --- a/WebKit/chromium/src/IDBTransactionBackendProxy.h +++ b/WebKit/chromium/src/IDBTransactionBackendProxy.h @@ -42,7 +42,7 @@ public: static PassRefPtr<IDBTransactionBackendInterface> create(PassOwnPtr<WebKit::WebIDBTransaction>); virtual ~IDBTransactionBackendProxy(); - virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name); + virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, ExceptionCode&); virtual unsigned short mode() const; virtual void abort(); virtual bool scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>, PassOwnPtr<ScriptExecutionContext::Task>); diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp index 947e732..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() @@ -94,6 +100,7 @@ String searchMenuRecentSearchesText() { return query(WebLocalizedString::SearchMenuRecentSearchesText); } + String searchMenuClearRecentSearchesText() { return query(WebLocalizedString::SearchMenuClearRecentSearchesText); @@ -190,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 @@ -299,6 +306,31 @@ String validationMessageValueMissingText() return query(WebLocalizedString::ValidationValueMissing); } +String validationMessageValueMissingForCheckboxText() +{ + return query(WebLocalizedString::ValidationValueMissingForCheckbox); +} + +String validationMessageValueMissingForFileText() +{ + return query(WebLocalizedString::ValidationValueMissingForFile); +} + +String validationMessageValueMissingForMultipleFileText() +{ + return query(WebLocalizedString::ValidationValueMissingForMultipleFile); +} + +String validationMessageValueMissingForRadioText() +{ + return query(WebLocalizedString::ValidationValueMissingForRadio); +} + +String validationMessageValueMissingForSelectText() +{ + return query(WebLocalizedString::ValidationValueMissingForSelect); +} + String validationMessageTypeMismatchText() { return query(WebLocalizedString::ValidationTypeMismatch); @@ -324,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/WebAudioBus.cpp b/WebKit/chromium/src/WebAudioBus.cpp new file mode 100644 index 0000000..ceccafc --- /dev/null +++ b/WebKit/chromium/src/WebAudioBus.cpp @@ -0,0 +1,130 @@ +/* + * 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 INC. 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 INC. 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 "WebAudioBus.h" + +#if ENABLE(WEB_AUDIO) +#include "AudioBus.h" +#else +namespace WebCore { +class AudioBus { +}; +} // namespace WebCore +#endif + +#include <wtf/OwnPtr.h> +#include <wtf/PassOwnPtr.h> + +using namespace WebCore; + +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) + AudioBus* audioBus = new AudioBus(numberOfChannels, length); + audioBus->setSampleRate(sampleRate); + + if (m_private) + delete m_private; + m_private = static_cast<WebAudioBusPrivate*>(audioBus); +#else + ASSERT_NOT_REACHED(); +#endif +} + +unsigned WebAudioBus::numberOfChannels() const +{ +#if ENABLE(WEB_AUDIO) + if (!m_private) + return 0; + return m_private->numberOfChannels(); +#else + ASSERT_NOT_REACHED(); + return 0; +#endif +} + +size_t WebAudioBus::length() const +{ +#if ENABLE(WEB_AUDIO) + if (!m_private) + return 0; + return m_private->length(); +#else + ASSERT_NOT_REACHED(); + return 0; +#endif +} + +double WebAudioBus::sampleRate() const +{ +#if ENABLE(WEB_AUDIO) + if (!m_private) + return 0; + return m_private->sampleRate(); +#else + ASSERT_NOT_REACHED(); + return 0; +#endif +} + +float* WebAudioBus::channelData(unsigned channelIndex) +{ +#if ENABLE(WEB_AUDIO) + if (!m_private) + return 0; + ASSERT(channelIndex < numberOfChannels()); + return m_private->channel(channelIndex)->data(); +#else + ASSERT_NOT_REACHED(); + return 0; +#endif +} + +PassOwnPtr<AudioBus> WebAudioBus::release() +{ +#if ENABLE(WEB_AUDIO) + OwnPtr<AudioBus> audioBus(adoptPtr(static_cast<AudioBus*>(m_private))); + m_private = 0; + return audioBus.release(); +#else + ASSERT_NOT_REACHED(); + return 0; +#endif +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp index d0a20d3..0882e38 100644 --- a/WebKit/chromium/src/WebBindings.cpp +++ b/WebKit/chromium/src/WebBindings.cpp @@ -328,7 +328,7 @@ static NPObject* makeStringArrayImpl(const WebVector<WebString>& data) v8::HandleScope handleScope; v8::Handle<v8::Array> result = v8::Array::New(data.size()); for (size_t i = 0; i < data.size(); ++i) - result->Set(i, data[i].data() ? v8::String::New(reinterpret_cast<const uint16_t*>((data[i].data()))) : v8::String::New("")); + result->Set(i, data[i].data() ? v8::String::New(reinterpret_cast<const uint16_t*>((data[i].data())), data[i].length()) : v8::String::New("")); WebCore::DOMWindow* window = WebCore::V8Proxy::retrieveWindow(WebCore::V8Proxy::currentContext()); return npCreateV8ScriptObject(0, result, window); 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/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp index adaab61..4422e1b 100644 --- a/WebKit/chromium/src/WebFrameImpl.cpp +++ b/WebKit/chromium/src/WebFrameImpl.cpp @@ -71,6 +71,7 @@ #include "config.h" #include "WebFrameImpl.h" +#include "AssociatedURLLoader.h" #include "Chrome.h" #include "ChromiumBridge.h" #include "ClipboardUtilitiesChromium.h" @@ -1037,6 +1038,11 @@ void WebFrameImpl::dispatchWillSendRequest(WebURLRequest& request) 0, 0, request.toMutableResourceRequest(), response); } +WebURLLoader* WebFrameImpl::createAssociatedURLLoader() +{ + return new AssociatedURLLoader(this); +} + void WebFrameImpl::commitDocumentData(const char* data, size_t length) { m_frame->loader()->documentLoader()->commitData(data, length); diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h index 35158a1..52d9db4 100644 --- a/WebKit/chromium/src/WebFrameImpl.h +++ b/WebKit/chromium/src/WebFrameImpl.h @@ -128,6 +128,7 @@ public: virtual bool isViewSourceModeEnabled() const; virtual void setReferrerForRequest(WebURLRequest&, const WebURL& referrer); virtual void dispatchWillSendRequest(WebURLRequest&); + virtual WebURLLoader* createAssociatedURLLoader(); virtual void commitDocumentData(const char* data, size_t length); virtual unsigned unloadListenerCount() const; virtual bool isProcessingUserGesture() const; diff --git a/WebKit/chromium/src/WebGeolocationError.cpp b/WebKit/chromium/src/WebGeolocationError.cpp new file mode 100644 index 0000000..9acb676 --- /dev/null +++ b/WebKit/chromium/src/WebGeolocationError.cpp @@ -0,0 +1,67 @@ +/* + * 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 "WebGeolocationError.h" + +#include "GeolocationError.h" +#include "WebString.h" + +using namespace WebCore; + +namespace WebKit { + +void WebGeolocationError::assign(Error code, const WebString& message) +{ + m_private = GeolocationError::create(static_cast<GeolocationError::ErrorCode>(code), message); +} + +void WebGeolocationError::assign(const WebGeolocationError& other) +{ + m_private = other.m_private; +} + +void WebGeolocationError::reset() +{ + m_private.reset(); +} + +WebGeolocationError::WebGeolocationError(PassRefPtr<GeolocationError> error) +{ + m_private = error; +} + +WebGeolocationError& WebGeolocationError::operator=(PassRefPtr<GeolocationError> error) +{ + m_private = error; + return *this; +} + +WebGeolocationError::operator PassRefPtr<GeolocationError>() const +{ + return m_private.get(); +} + +} diff --git a/WebKit/chromium/src/WebGeolocationPosition.cpp b/WebKit/chromium/src/WebGeolocationPosition.cpp new file mode 100644 index 0000000..75b3306 --- /dev/null +++ b/WebKit/chromium/src/WebGeolocationPosition.cpp @@ -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. + */ + +#include "config.h" +#include "WebGeolocationPosition.h" + +#include "GeolocationPosition.h" + +using namespace WebCore; + +namespace WebKit { + +void WebGeolocationPosition::assign(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) +{ + m_private = GeolocationPosition::create(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed); +} + +void WebGeolocationPosition::assign(const WebGeolocationPosition& other) +{ + m_private = other.m_private; +} + +void WebGeolocationPosition::reset() +{ + m_private.reset(); +} + +WebGeolocationPosition& WebGeolocationPosition::operator=(PassRefPtr<GeolocationPosition> position) +{ + m_private = position; + return *this; +} + +WebGeolocationPosition::operator PassRefPtr<GeolocationPosition>() const +{ + return m_private.get(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp index bd070c6..9a74601 100644 --- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp +++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp @@ -439,20 +439,29 @@ void WebGraphicsContext3DDefaultImpl::reshape(int width, int height) } // Initialize renderbuffers to 0. - GLboolean colorMask[] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE}, depthMask = GL_TRUE, stencilMask = GL_TRUE; + GLfloat clearColor[] = {0, 0, 0, 0}, clearDepth = 0; + GLint clearStencil = 0; + GLboolean colorMask[] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE}, depthMask = GL_TRUE; + GLuint stencilMask = 0xffffffff; GLboolean isScissorEnabled = GL_FALSE; GLboolean isDitherEnabled = GL_FALSE; GLbitfield clearMask = GL_COLOR_BUFFER_BIT; + glGetFloatv(GL_COLOR_CLEAR_VALUE, clearColor); + glClearColor(0, 0, 0, 0); glGetBooleanv(GL_COLOR_WRITEMASK, colorMask); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); if (m_attributes.depth) { + glGetFloatv(GL_DEPTH_CLEAR_VALUE, &clearDepth); + glClearDepth(1); glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMask); glDepthMask(GL_TRUE); clearMask |= GL_DEPTH_BUFFER_BIT; } if (m_attributes.stencil) { - glGetBooleanv(GL_STENCIL_WRITEMASK, &stencilMask); - glStencilMask(GL_TRUE); + glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &clearStencil); + glClearStencil(0); + glGetIntegerv(GL_STENCIL_WRITEMASK, reinterpret_cast<GLint*>(&stencilMask)); + glStencilMaskSeparate(GL_FRONT, 0xffffffff); clearMask |= GL_STENCIL_BUFFER_BIT; } isScissorEnabled = glIsEnabled(GL_SCISSOR_TEST); @@ -462,11 +471,16 @@ void WebGraphicsContext3DDefaultImpl::reshape(int width, int height) glClear(clearMask); + glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]); glColorMask(colorMask[0], colorMask[1], colorMask[2], colorMask[3]); - if (m_attributes.depth) + if (m_attributes.depth) { + glClearDepth(clearDepth); glDepthMask(depthMask); - if (m_attributes.stencil) - glStencilMask(stencilMask); + } + if (m_attributes.stencil) { + glClearStencil(clearStencil); + glStencilMaskSeparate(GL_FRONT, stencilMask); + } if (isScissorEnabled) glEnable(GL_SCISSOR_TEST); else @@ -973,6 +987,11 @@ unsigned long WebGraphicsContext3DDefaultImpl::getError() return glGetError(); } +bool WebGraphicsContext3DDefaultImpl::isContextLost() +{ + return false; +} + DELEGATE_TO_GL_2(getFloatv, GetFloatv, unsigned long, float*) void WebGraphicsContext3DDefaultImpl::getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h index e865710..32e3671 100644 --- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h +++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h @@ -145,6 +145,8 @@ public: virtual unsigned long getError(); + virtual bool isContextLost(); + virtual void getFloatv(unsigned long pname, float* value); virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value); diff --git a/WebKit/chromium/src/WebResourceRawHeaders.cpp b/WebKit/chromium/src/WebHTTPLoadInfo.cpp index 259365e..876a489 100644 --- a/WebKit/chromium/src/WebResourceRawHeaders.cpp +++ b/WebKit/chromium/src/WebHTTPLoadInfo.cpp @@ -29,9 +29,9 @@ */ #include "config.h" -#include "WebResourceRawHeaders.h" +#include "WebHTTPLoadInfo.h" -#include "ResourceRawHeaders.h" +#include "ResourceLoadInfo.h" #include "ResourceResponse.h" #include "WebHTTPHeaderVisitor.h" #include "WebString.h" @@ -40,31 +40,55 @@ using namespace WebCore; namespace WebKit { -void WebResourceRawHeaders::initialize() +void WebHTTPLoadInfo::initialize() { - m_private = adoptRef(new ResourceRawHeaders()); + m_private = adoptRef(new ResourceLoadInfo()); } -void WebResourceRawHeaders::reset() +void WebHTTPLoadInfo::reset() { m_private.reset(); } -void WebResourceRawHeaders::assign(const WebResourceRawHeaders& r) +void WebHTTPLoadInfo::assign(const WebHTTPLoadInfo& r) { m_private = r.m_private; } -WebResourceRawHeaders::WebResourceRawHeaders(WTF::PassRefPtr<WebCore::ResourceRawHeaders> value) +WebHTTPLoadInfo::WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo> value) { m_private = value; } -WebResourceRawHeaders::operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>() const +WebHTTPLoadInfo::operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const { return m_private.get(); } +int WebHTTPLoadInfo::httpStatusCode() const +{ + ASSERT(!m_private.isNull()); + return m_private->httpStatusCode; +} + +void WebHTTPLoadInfo::setHTTPStatusCode(int statusCode) +{ + ASSERT(!m_private.isNull()); + m_private->httpStatusCode = statusCode; +} + +WebString WebHTTPLoadInfo::httpStatusText() const +{ + ASSERT(!m_private.isNull()); + return m_private->httpStatusText; +} + +void WebHTTPLoadInfo::setHTTPStatusText(const WebString& statusText) +{ + ASSERT(!m_private.isNull()); + m_private->httpStatusText = statusText; +} + static void addHeader(HTTPHeaderMap* map, const WebString& name, const WebString& value) { pair<HTTPHeaderMap::iterator, bool> result = map->add(name, value); @@ -72,13 +96,13 @@ static void addHeader(HTTPHeaderMap* map, const WebString& name, const WebString result.first->second += String("\n") + value; } -void WebResourceRawHeaders::addRequestHeader(const WebString& name, const WebString& value) +void WebHTTPLoadInfo::addRequestHeader(const WebString& name, const WebString& value) { ASSERT(!m_private.isNull()); addHeader(&m_private->requestHeaders, name, value); } -void WebResourceRawHeaders::addResponseHeader(const WebString& name, const WebString& value) +void WebHTTPLoadInfo::addResponseHeader(const WebString& name, const WebString& value) { ASSERT(!m_private.isNull()); addHeader(&m_private->responseHeaders, name, value); diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp index 2d95e21..fa7a200 100644 --- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp +++ b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp @@ -54,32 +54,29 @@ WebString WebIDBDatabaseImpl::name() const return m_databaseBackend->name(); } -WebString WebIDBDatabaseImpl::description() const -{ - return m_databaseBackend->description(); -} - WebString WebIDBDatabaseImpl::version() const { return m_databaseBackend->version(); } -WebDOMStringList WebIDBDatabaseImpl::objectStores() const +WebDOMStringList WebIDBDatabaseImpl::objectStoreNames() const { - return m_databaseBackend->objectStores(); + return m_databaseBackend->objectStoreNames(); } WebIDBObjectStore* WebIDBDatabaseImpl::createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec) { RefPtr<IDBObjectStoreBackendInterface> objectStore = m_databaseBackend->createObjectStore(name, keyPath, autoIncrement, transaction.getIDBTransactionBackendInterface(), ec); - if (!objectStore) + if (!objectStore) { + ASSERT(ec); return 0; + } return new WebIDBObjectStoreImpl(objectStore); } -void WebIDBDatabaseImpl::removeObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) +void WebIDBDatabaseImpl::deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { - m_databaseBackend->removeObjectStore(name, transaction.getIDBTransactionBackendInterface(), ec); + m_databaseBackend->deleteObjectStore(name, transaction.getIDBTransactionBackendInterface(), ec); } void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode& ec) @@ -91,8 +88,10 @@ WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names { RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names); RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, timeout, ec); - if (!transaction) + if (!transaction) { + ASSERT(ec); return 0; + } return new WebIDBTransactionImpl(transaction); } diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h index 94f1101..64e0b2e 100644 --- a/WebKit/chromium/src/WebIDBDatabaseImpl.h +++ b/WebKit/chromium/src/WebIDBDatabaseImpl.h @@ -46,12 +46,11 @@ public: virtual ~WebIDBDatabaseImpl(); virtual WebString name() const; - virtual WebString description() const; virtual WebString version() const; - virtual WebDOMStringList objectStores() const; + virtual WebDOMStringList objectStoreNames() const; virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&); - virtual void removeObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&); + virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&); virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&); virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&); virtual void close(); diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp index 5d0ab85..a509076 100755 --- a/WebKit/chromium/src/WebIDBFactoryImpl.cpp +++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp @@ -58,9 +58,9 @@ WebIDBFactoryImpl::~WebIDBFactoryImpl() { } -void WebIDBFactoryImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir, unsigned long long maximumSize) +void WebIDBFactoryImpl::open(const WebString& name, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir, unsigned long long maximumSize) { - m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0, dataDir, maximumSize); + m_idbFactoryBackend->open(name, IDBCallbacksProxy::create(callbacks), origin, 0, dataDir, maximumSize); } } // namespace WebKit diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h index 4bc9426..9ed6e3f 100755 --- a/WebKit/chromium/src/WebIDBFactoryImpl.h +++ b/WebKit/chromium/src/WebIDBFactoryImpl.h @@ -42,7 +42,7 @@ public: WebIDBFactoryImpl(); virtual ~WebIDBFactoryImpl(); - virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir, unsigned long long maximumSize); + virtual void open(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir, unsigned long long maximumSize); private: WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend; diff --git a/WebKit/chromium/src/WebIDBKeyRange.cpp b/WebKit/chromium/src/WebIDBKeyRange.cpp index 720af5f..ec5b7c2 100644 --- a/WebKit/chromium/src/WebIDBKeyRange.cpp +++ b/WebKit/chromium/src/WebIDBKeyRange.cpp @@ -39,12 +39,24 @@ void WebIDBKeyRange::assign(const WebIDBKeyRange& other) m_private = other.m_private; } -void WebIDBKeyRange::assign(const WebIDBKey& left, const WebIDBKey& right, unsigned short flags) +void WebIDBKeyRange::assign(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen) { - if (left.type() == WebIDBKey::InvalidType && right.type() == WebIDBKey::InvalidType) + if (lower.type() == WebIDBKey::InvalidType && upper.type() == WebIDBKey::InvalidType) m_private = 0; else - m_private = IDBKeyRange::create(left, right, flags); + 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() @@ -54,23 +66,50 @@ void WebIDBKeyRange::reset() WebIDBKey WebIDBKeyRange::left() const { + return lower(); +} + +WebIDBKey WebIDBKeyRange::right() const +{ + return upper(); +} + +WebIDBKey WebIDBKeyRange::lower() const +{ if (!m_private.get()) return WebIDBKey::createInvalid(); - return m_private->left(); + return m_private->lower(); } -WebIDBKey WebIDBKeyRange::right() const +WebIDBKey WebIDBKeyRange::upper() const { if (!m_private.get()) return WebIDBKey::createInvalid(); - return m_private->right(); + return m_private->upper(); +} + +bool WebIDBKeyRange::lowerOpen() const +{ + return m_private.get() && m_private->lowerOpen(); } +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; - return m_private->flags(); + + unsigned short flags = 0; + if (m_private->lowerOpen()) + flags |= 1; + if (m_private->upperOpen()) + flags |= 2; + return flags; } WebIDBKeyRange::WebIDBKeyRange(const PassRefPtr<IDBKeyRange>& value) diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp index 5dd2652..0503ede 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp @@ -76,9 +76,9 @@ void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const Web m_objectStore->put(value, key, addOnly, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); } -void WebIDBObjectStoreImpl::remove(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) +void WebIDBObjectStoreImpl::deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) { - m_objectStore->remove(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); + m_objectStore->deleteFunction(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); } WebIDBIndex* WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction& transaction, WebExceptionCode& ec) @@ -97,9 +97,9 @@ WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name, WebExceptionCod return new WebIDBIndexImpl(index); } -void WebIDBObjectStoreImpl::removeIndex(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) +void WebIDBObjectStoreImpl::deleteIndex(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { - m_objectStore->removeIndex(name, transaction.getIDBTransactionBackendInterface(), ec); + m_objectStore->deleteIndex(name, transaction.getIDBTransactionBackendInterface(), ec); } void WebIDBObjectStoreImpl::openCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/WebKit/chromium/src/WebIDBObjectStoreImpl.h index 9148118..f9cd776 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.h +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.h @@ -49,11 +49,11 @@ public: void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); void put(const WebSerializedScriptValue&, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - void remove(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); + void deleteFunction(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&); WebIDBIndex* index(const WebString& name, WebExceptionCode&); - void removeIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&); + void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&); void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/WebKit/chromium/src/WebIDBTransactionImpl.cpp index 4307cb5..1ed6f4b 100644 --- a/WebKit/chromium/src/WebIDBTransactionImpl.cpp +++ b/WebKit/chromium/src/WebIDBTransactionImpl.cpp @@ -51,9 +51,9 @@ int WebIDBTransactionImpl::mode() const return m_backend->mode(); } -WebIDBObjectStore* WebIDBTransactionImpl::objectStore(const WebString& name) +WebIDBObjectStore* WebIDBTransactionImpl::objectStore(const WebString& name, ExceptionCode& ec) { - RefPtr<IDBObjectStoreBackendInterface> objectStore = m_backend->objectStore(name); + RefPtr<IDBObjectStoreBackendInterface> objectStore = m_backend->objectStore(name, ec); if (!objectStore) return 0; return new WebIDBObjectStoreImpl(objectStore); diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.h b/WebKit/chromium/src/WebIDBTransactionImpl.h index b26b3ac..d26fc37 100644 --- a/WebKit/chromium/src/WebIDBTransactionImpl.h +++ b/WebKit/chromium/src/WebIDBTransactionImpl.h @@ -42,7 +42,7 @@ public: virtual ~WebIDBTransactionImpl(); virtual int mode() const; - virtual WebIDBObjectStore* objectStore(const WebString& name); + virtual WebIDBObjectStore* objectStore(const WebString& name, WebExceptionCode&); virtual void abort(); virtual void didCompleteTaskEvents(); virtual void setCallbacks(WebIDBTransactionCallbacks*); diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp index d032ef8..8d89c60 100644 --- a/WebKit/chromium/src/WebInputElement.cpp +++ b/WebKit/chromium/src/WebInputElement.cpp @@ -160,6 +160,8 @@ bool WebInputElement::isValidValue(const WebString& value) const return constUnwrap<HTMLInputElement>()->isValidValue(value); } +const int WebInputElement::defaultMaxLength = HTMLInputElement::s_maximumLength; + WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem) : WebFormControlElement(elem) { diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp index 1bea259..e60562c 100644 --- a/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/WebKit/chromium/src/WebSettingsImpl.cpp @@ -284,6 +284,31 @@ void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled) m_settings->setAcceleratedCompositingEnabled(enabled); } +void WebSettingsImpl::setAcceleratedCompositingFor3DTransformsEnabled(bool enabled) +{ + m_settings->setAcceleratedCompositingFor3DTransformsEnabled(enabled); +} + +void WebSettingsImpl::setAcceleratedCompositingForVideoEnabled(bool enabled) +{ + m_settings->setAcceleratedCompositingForVideoEnabled(enabled); +} + +void WebSettingsImpl::setAcceleratedCompositingForPluginsEnabled(bool enabled) +{ + m_settings->setAcceleratedCompositingForPluginsEnabled(enabled); +} + +void WebSettingsImpl::setAcceleratedCompositingForCanvasEnabled(bool enabled) +{ + m_settings->setAcceleratedCompositingForCanvasEnabled(enabled); +} + +void WebSettingsImpl::setAcceleratedCompositingForAnimationEnabled(bool enabled) +{ + m_settings->setAcceleratedCompositingForAnimationEnabled(enabled); +} + void WebSettingsImpl::setAccelerated2dCanvasEnabled(bool enabled) { m_settings->setAccelerated2dCanvasEnabled(enabled); diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h index 081188f..ffdc8d3 100644 --- a/WebKit/chromium/src/WebSettingsImpl.h +++ b/WebKit/chromium/src/WebSettingsImpl.h @@ -88,6 +88,11 @@ public: virtual void setShowDebugBorders(bool); virtual void setEditingBehavior(EditingBehavior); virtual void setAcceleratedCompositingEnabled(bool); + virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool); + virtual void setAcceleratedCompositingForVideoEnabled(bool); + virtual void setAcceleratedCompositingForPluginsEnabled(bool); + virtual void setAcceleratedCompositingForCanvasEnabled(bool); + virtual void setAcceleratedCompositingForAnimationEnabled(bool); virtual void setAccelerated2dCanvasEnabled(bool); virtual void setMemoryInfoEnabled(bool); virtual void setHyperlinkAuditingEnabled(bool); diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp index 8cf7848..48f8b50 100644 --- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp +++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp @@ -55,9 +55,9 @@ WebSpeechInputControllerMockImpl::~WebSpeechInputControllerMockImpl() m_webcoreMock->setListener(0); } -void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString& result, const WebString &language) +void WebSpeechInputControllerMockImpl::addMockRecognitionResult(const WebString& result, double confidence, const WebString &language) { - m_webcoreMock->setRecognitionResult(result, language); + m_webcoreMock->addRecognitionResult(result, confidence, language); } void WebSpeechInputControllerMockImpl::clearResults() diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h index 7680873..bf00ed0 100644 --- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h +++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h @@ -62,7 +62,7 @@ public: void stopRecording(int requestId); // WebSpeechInputControllerMock methods. - void setMockRecognitionResult(const WebString& result, const WebString& language); + void addMockRecognitionResult(const WebString& result, double confidence, const WebString& language); void clearResults(); private: diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp index 5343921..bf3c521 100644 --- a/WebKit/chromium/src/WebURLResponse.cpp +++ b/WebKit/chromium/src/WebURLResponse.cpp @@ -35,6 +35,7 @@ #include "ResourceLoadTiming.h" #include "WebHTTPHeaderVisitor.h" +#include "WebHTTPLoadInfo.h" #include "WebString.h" #include "WebURL.h" #include "WebURLLoadTiming.h" @@ -129,14 +130,14 @@ void WebURLResponse::setLoadTiming(const WebURLLoadTiming& timing) m_private->m_resourceResponse->setResourceLoadTiming(loadTiming.release()); } -WebResourceRawHeaders WebURLResponse::resourceRawHeaders() +WebHTTPLoadInfo WebURLResponse::httpLoadInfo() { - return WebResourceRawHeaders(m_private->m_resourceResponse->resourceRawHeaders()); + return WebHTTPLoadInfo(m_private->m_resourceResponse->resourceLoadInfo()); } -void WebURLResponse::setResourceRawHeaders(const WebResourceRawHeaders& value) +void WebURLResponse::setHTTPLoadInfo(const WebHTTPLoadInfo& value) { - m_private->m_resourceResponse->setResourceRawHeaders(value); + m_private->m_resourceResponse->setResourceLoadInfo(value); } double WebURLResponse::responseTime() const diff --git a/WebKit/chromium/src/WebURLResponsePrivate.h b/WebKit/chromium/src/WebURLResponsePrivate.h index 4181e4c..dc5ce22 100644 --- a/WebKit/chromium/src/WebURLResponsePrivate.h +++ b/WebKit/chromium/src/WebURLResponsePrivate.h @@ -31,7 +31,6 @@ #ifndef WebURLResponsePrivate_h #define WebURLResponsePrivate_h -#include "WebResourceRawHeaders.h" #include "WebString.h" namespace WebCore { class ResourceResponse; } diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index 6625949..e44c374 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -139,6 +139,27 @@ using namespace WebCore; +namespace { + +GraphicsContext3D::Attributes getCompositorContextAttributes() +{ + // Explicitly disable antialiasing for the compositor. As of the time of + // this writing, the only platform that supported antialiasing for the + // compositor was Mac OS X, because the on-screen OpenGL context creation + // code paths on Windows and Linux didn't yet have multisampling support. + // Mac OS X essentially always behaves as though it's rendering offscreen. + // Multisampling has a heavy cost especially on devices with relatively low + // fill rate like most notebooks, and the Mac implementation would need to + // be optimized to resolve directly into the IOSurface shared between the + // GPU and browser processes. For these reasons and to avoid platform + // disparities we explicitly disable antialiasing. + GraphicsContext3D::Attributes attributes; + attributes.antialias = false; + return attributes; +} + +} // anonymous namespace + namespace WebKit { // Change the text zoom level by kTextSizeMultiplierRatio each time the user @@ -937,7 +958,7 @@ void WebViewImpl::resize(const WebSize& newSize) } #if USE(ACCELERATED_COMPOSITING) - if (m_layerRenderer) { + if (m_layerRenderer && isAcceleratedCompositingActive()) { m_layerRenderer->resizeOnscreenContent(IntSize(std::max(1, m_size.width), std::max(1, m_size.height))); } @@ -2251,17 +2272,15 @@ bool WebViewImpl::allowsAcceleratedCompositing() void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer) { - bool wasActive = m_isAcceleratedCompositingActive; setIsAcceleratedCompositingActive(layer ? true : false); if (m_layerRenderer) m_layerRenderer->setRootLayer(layer); - if (wasActive != m_isAcceleratedCompositingActive) { - IntRect damagedRect(0, 0, m_size.width, m_size.height); - if (m_isAcceleratedCompositingActive) - invalidateRootLayerRect(damagedRect); - else - m_client->didInvalidateRect(damagedRect); - } + + IntRect damagedRect(0, 0, m_size.width, m_size.height); + if (m_isAcceleratedCompositingActive) + invalidateRootLayerRect(damagedRect); + else + m_client->didInvalidateRect(damagedRect); } void WebViewImpl::setRootLayerNeedsDisplay() @@ -2318,6 +2337,9 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& } } + // Move the previous damage + m_rootLayerScrollDamage.move(scrollDelta.width(), scrollDelta.height()); + // Union with the new damage rect. m_rootLayerScrollDamage.unite(damagedContentsRect); // Scroll any existing damage that intersects with clip rect @@ -2357,7 +2379,8 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) if (!active) { m_isAcceleratedCompositingActive = false; - m_layerRenderer->finish(); // finish all GL rendering before we hide the window? + if (m_layerRenderer) + m_layerRenderer->finish(); // finish all GL rendering before we hide the window? m_client->didActivateAcceleratedCompositing(false); return; } @@ -2373,13 +2396,13 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release(); if (!context) { - m_client->didActivateAcceleratedCompositing(true); - context = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); + context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); if (context) context->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); } m_layerRenderer = LayerRendererChromium::create(context.release()); if (m_layerRenderer) { + m_client->didActivateAcceleratedCompositing(true); m_isAcceleratedCompositingActive = true; m_compositorCreationFailed = false; } else { @@ -2509,8 +2532,7 @@ WebGraphicsContext3D* WebViewImpl::graphicsContext3D() else if (m_temporaryOnscreenGraphicsContext3D) context = m_temporaryOnscreenGraphicsContext3D.get(); else { - GraphicsContext3D::Attributes attributes; - m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); + m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); if (m_temporaryOnscreenGraphicsContext3D) m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); context = m_temporaryOnscreenGraphicsContext3D.get(); diff --git a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp b/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp index 8d8e469..0d0ac8b 100644 --- a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp +++ b/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp @@ -64,6 +64,11 @@ WorkerAsyncFileWriterChromium::~WorkerAsyncFileWriterChromium() m_bridge->postShutdownToMainThread(m_bridge); } +bool WorkerAsyncFileWriterChromium::waitForOperationToComplete() +{ + return m_bridge->waitForOperationToComplete(); +} + void WorkerAsyncFileWriterChromium::write(long long position, Blob* data) { m_bridge->postWriteToMainThread(position, data->url()); diff --git a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h b/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h index 55d8d24..01058c3 100644 --- a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h +++ b/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h @@ -67,6 +67,8 @@ public: } ~WorkerAsyncFileWriterChromium(); + bool waitForOperationToComplete(); + // FileWriter virtual void write(long long position, Blob* data); virtual void truncate(long long length); diff --git a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp b/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp index 827c011..179aea5 100644 --- a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp +++ b/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp @@ -59,16 +59,21 @@ void WorkerFileWriterCallbacksBridge::notifyStop() void WorkerFileWriterCallbacksBridge::postWriteToMainThread(long long position, const KURL& data) { + ASSERT(!m_operationInProgress); + m_operationInProgress = true; dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread, this, position, data)); } void WorkerFileWriterCallbacksBridge::postTruncateToMainThread(long long length) { + ASSERT(!m_operationInProgress); + m_operationInProgress = true; dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread, this, length)); } void WorkerFileWriterCallbacksBridge::postAbortToMainThread() { + ASSERT(m_operationInProgress); dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, this)); } @@ -121,14 +126,19 @@ void WorkerFileWriterCallbacksBridge::didTruncate() dispatchTaskToWorkerThread(createCallbackTask(&didTruncateOnWorkerThread, this)); } +static const char fileWriterOperationsMode[] = "fileWriterOperationsMode"; + WorkerFileWriterCallbacksBridge::WorkerFileWriterCallbacksBridge(const String& path, WorkerLoaderProxy* proxy, ScriptExecutionContext* scriptExecutionContext, AsyncFileWriterClient* client) : WorkerContext::Observer(static_cast<WorkerContext*>(scriptExecutionContext)) , m_proxy(proxy) , m_workerContext(scriptExecutionContext) , m_clientOnWorkerThread(client) , m_writerDeleted(false) + , m_operationInProgress(false) { ASSERT(m_workerContext->isContextThread()); + m_mode = fileWriterOperationsMode; + m_mode.append(String::number(static_cast<WorkerContext*>(scriptExecutionContext)->thread()->runLoop().createUniqueId())); postInitToMainThread(path); } @@ -147,18 +157,25 @@ WorkerFileWriterCallbacksBridge::~WorkerFileWriterCallbacksBridge() void WorkerFileWriterCallbacksBridge::didWriteOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long length, bool complete) { ASSERT(bridge->m_workerContext->isContextThread()); + ASSERT(bridge->m_operationInProgress); + if (complete) + bridge->m_operationInProgress = false; bridge->m_clientOnWorkerThread->didWrite(length, complete); } void WorkerFileWriterCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, WebFileError error) { ASSERT(bridge->m_workerContext->isContextThread()); + ASSERT(bridge->m_operationInProgress); + bridge->m_operationInProgress = false; bridge->m_clientOnWorkerThread->didFail(static_cast<FileError::ErrorCode>(error)); } void WorkerFileWriterCallbacksBridge::didTruncateOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge) { ASSERT(bridge->m_workerContext->isContextThread()); + ASSERT(bridge->m_operationInProgress); + bridge->m_operationInProgress = false; bridge->m_clientOnWorkerThread->didTruncate(); } @@ -185,9 +202,19 @@ void WorkerFileWriterCallbacksBridge::dispatchTaskToMainThread(PassOwnPtr<Script void WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread(PassOwnPtr<ScriptExecutionContext::Task> task) { ASSERT(isMainThread()); - m_proxy->postTaskForModeToWorkerContext(createCallbackTask(&runTaskOnWorkerThread, this, task), WorkerRunLoop::defaultMode()); + m_proxy->postTaskForModeToWorkerContext(createCallbackTask(&runTaskOnWorkerThread, this, task), m_mode); } +bool WorkerFileWriterCallbacksBridge::waitForOperationToComplete() +{ + while (m_operationInProgress) { + WorkerContext* context = static_cast<WorkerContext*>(m_workerContext); + if (context->thread()->runLoop().runInMode(context, m_mode) == MessageQueueTerminated) + return false; + } + return true; } +} // namespace WebKit + #endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h b/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h index d2e416e..62e333c 100644 --- a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h +++ b/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h @@ -106,6 +106,9 @@ public: void didFail(WebFileError); void didTruncate(); + // Call this on the context thread to wait for the current operation to complete. + bool waitForOperationToComplete(); + private: WorkerFileWriterCallbacksBridge(const String& path, WebCore::WorkerLoaderProxy*, WebCore::ScriptExecutionContext*, WebCore::AsyncFileWriterClient*); @@ -147,6 +150,12 @@ private: // Used to indicate that shutdown has started on the main thread, and hence the writer has been deleted. bool m_writerDeleted; + + // Used by waitForOperationToComplete. + bool m_operationInProgress; + + // Used by postTaskForModeToWorkerContext and runInMode. + String m_mode; }; } // namespace WebCore diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js index 8b3aea0..5bb150c 100644 --- a/WebKit/chromium/src/js/DevTools.js +++ b/WebKit/chromium/src/js/DevTools.js @@ -47,6 +47,8 @@ var context = {}; // Used by WebCore's inspector routines. Preferences.onlineDetectionEnabled = false; Preferences.nativeInstrumentationEnabled = true; Preferences.fileSystemEnabled = false; + Preferences.showTimingTab = true; + Preferences.showCookiesTab = true; })(); var devtools = devtools || {}; |