diff options
Diffstat (limited to 'WebKit/chromium')
29 files changed, 418 insertions, 102 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index 2c720e1..9a33ade 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,252 @@ +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClientImpl::createPopupMenu): + (WebKit::ChromeClientImpl::createSearchPopupMenu): + * src/ChromeClientImpl.h: + +2010-08-02 Kent Tamura <tkent@chromium.org> + + Reviewed by Dimitri Glazkov. + + [DRT/Chromium] Always initialize GTK + https://bugs.webkit.org/show_bug.cgi?id=43327 + + * WebKit.gyp: Add GTK dependency for DRT. + +2010-08-02 Jeremy Orlow <jorlow@chromium.org> + + Speculative revert of 64425 due to Chromium instability + https://bugs.webkit.org/show_bug.cgi?id=43347 + + * src/ChromeClientImpl.cpp: + * src/ChromeClientImpl.h: + * tests/PopupMenuTest.cpp: + (WebKit::SelectPopupMenuTest::SetUp): + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClientImpl::createPopupMenu): + (WebKit::ChromeClientImpl::createSearchPopupMenu): + * src/ChromeClientImpl.h: + +2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64422. + http://trac.webkit.org/changeset/64422 + https://bugs.webkit.org/show_bug.cgi?id=43304 + + Build fixes are needed for Snow Leopard and Windows. + (Requested by lca on #webkit). + + * src/ChromeClientImpl.cpp: + * src/ChromeClientImpl.h: + +2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Fisher. + + PopupMenu refactoring in preparation to WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=42592 + + As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu + instances, concrete classes that inherit from ChromeClient needed to be changed to + implement the new methods. + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): + (WebKit::ChromeClientImpl::createPopupMenu): + (WebKit::ChromeClientImpl::createSearchPopupMenu): + * src/ChromeClientImpl.h: + +2010-07-30 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by David Kilzer. + + Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) + https://bugs.webkit.org/show_bug.cgi?id=40627 + + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::reachedApplicationCacheOriginQuota): + * src/ChromeClientImpl.h: + +2010-07-30 James Robinson <jamesr@chromium.org> + + Compile fix. Put GLES2 functions behind USE(GLES2_RENDERING) instead of + USE(ACCELERATED_COMPOSITING) to match WebCore. Fixes the compile when + USE(GLES2_RENDERING) is true and USE(ACCELERATED_COMPOSITING) is false. + + * src/ChromeClientImpl.cpp: + * src/ChromeClientImpl.h: + +2010-07-27 Darin Fisher <darin@chromium.org> + + Reviewed by Brady Eidson. + + History.pushState() + navigation operates on top frame when called from + nested context + https://bugs.webkit.org/show_bug.cgi?id=43080 + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::pluginLoadObserver): The WebDataSource + can be null if the Frame has already been detached from the Page. This + happens if a popstate event handler removes the frame. + +2010-07-29 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Steve Block. + + Rename all the IDBIndex classses to match the latest conventions + https://bugs.webkit.org/show_bug.cgi?id=43190 + + Fix up stuff in WebKit layer to handle the renamings in WebCore. + + * WebKit.gyp: + * src/IDBCallbacksProxy.cpp: + (WebCore::IDBCallbacksProxy::onSuccess): + * src/IDBCallbacksProxy.h: + * src/IDBIndexBackendProxy.cpp: Added. + (WebCore::IDBIndexBackendProxy::create): + (WebCore::IDBIndexBackendProxy::IDBIndexBackendProxy): + (WebCore::IDBIndexBackendProxy::~IDBIndexBackendProxy): + (WebCore::IDBIndexBackendProxy::name): + (WebCore::IDBIndexBackendProxy::keyPath): + (WebCore::IDBIndexBackendProxy::unique): + * src/IDBIndexBackendProxy.h: Added. + * src/IDBIndexProxy.cpp: Removed. + * src/IDBIndexProxy.h: Removed. + * src/IDBObjectStoreProxy.cpp: + (WebCore::IDBObjectStoreProxy::index): + * src/IDBObjectStoreProxy.h: + * src/WebIDBCallbacksImpl.cpp: + (WebCore::WebIDBCallbacksImpl::onSuccess): + * src/WebIDBIndexImpl.cpp: + (WebKit::WebIDBIndexImpl::WebIDBIndexImpl): + (WebKit::WebIDBIndexImpl::name): + (WebKit::WebIDBIndexImpl::keyPath): + (WebKit::WebIDBIndexImpl::unique): + * src/WebIDBIndexImpl.h: + * src/WebIDBObjectStoreImpl.cpp: + (WebKit::WebIDBObjectStoreImpl::index): + +2010-07-30 Satish Sampath <satish@chromium.org> + + Reviewed by Jeremy Orlow. + + Add a check for WebViewClient being null. + https://bugs.webkit.org/show_bug.cgi?id=43240 + + * src/SpeechInputClientImpl.cpp: + (WebKit::SpeechInputClientImpl::SpeechInputClientImpl): + +2010-07-30 Hans Wennborg <hans@chromium.org> + + Reviewed by Steve Block. + + Disable runtime switch for device orientation in chromium + https://bugs.webkit.org/show_bug.cgi?id=43237 + + Explicitly set the runtime switch for device orientation + in WebView::create until we implement the feature. + If the flag is accidentally on while no DeviceOrientationClient + is provided, the program will crash. + + * src/WebViewImpl.cpp: + (WebKit::WebView::create): + +2010-07-26 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + [IndexedDB] IndexedDatabase should be called IDBFactory. + https://bugs.webkit.org/show_bug.cgi?id=42967 + + * WebKit.gyp: + * public/WebIDBFactory.h: Added. + (WebKit::WebIDBFactory::~WebIDBFactory): + (WebKit::WebIDBFactory::databases): + (WebKit::WebIDBFactory::open): + * public/WebIndexedDatabase.h: Removed. + * public/WebKitClient.h: + (WebKit::WebKitClient::idbFactory): + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::idbFactory): + * src/IDBFactoryBackendProxy.cpp: Added. + (WebCore::IDBFactoryBackendProxy::create): + (WebCore::IDBFactoryBackendProxy::IDBFactoryBackendProxy): + (WebCore::IDBFactoryBackendProxy::~IDBFactoryBackendProxy): + (WebCore::IDBFactoryBackendProxy::open): + * src/IDBFactoryBackendProxy.h: Added. + * src/IndexedDatabaseProxy.cpp: Removed. + * src/IndexedDatabaseProxy.h: Removed. + * src/WebIDBFactoryImpl.cpp: Added. + (WebKit::WebIDBFactory::create): + (WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl): + (WebKit::WebIDBFactoryImpl::~WebIDBFactoryImpl): + (WebKit::WebIDBFactoryImpl::open): + * src/WebIDBFactoryImpl.h: Added. + * src/WebIndexedDatabaseImpl.cpp: Removed. + * src/WebIndexedDatabaseImpl.h: Removed. + +2010-07-29 Andrei Popescu <andreip@google.com> + + Reviewed by Jeremy Orlow. + + [IndexedDB] WebDOMStringList ctor is not exported and causes link errors for the multi-dll chromium build + https://bugs.webkit.org/show_bug.cgi?id=43186 + + Add WEBKIT_API to WebDOMStringList default ctor. + + * public/WebDOMStringList.h: + +2010-07-29 Satish Sampath <satish@chromium.org> + + Reviewed by Steve Block. + + Runtime feature switch for speech input + https://bugs.webkit.org/show_bug.cgi?id=43146 + + Add a runtime feature switch that decides whether speech input attributes are available or not. + Defaults to true. + + * public/WebRuntimeFeatures.h: + * src/SpeechInputClientImpl.cpp: + (WebKit::SpeechInputClientImpl::SpeechInputClientImpl): + * src/WebRuntimeFeatures.cpp: + (WebKit::WebRuntimeFeatures::enableSpeechInput): + (WebKit::WebRuntimeFeatures::isSpeechInputEnabled): + +2010-07-28 Kavita Kanetkar <kkanetkar@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: Enable UI for chromium's appcache inspection. + https://bugs.webkit.org/show_bug.cgi?id=43098 + + * src/js/DevTools.js: + (WebInspector.loaded): + 2010-07-28 Dominic Mazzoni <dmazzoni@google.com> Reviewed by Dimitri Glazkov. diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp index 97efddc..10f01e5 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -178,10 +178,10 @@ 'public/WebIDBCallbacks.h', 'public/WebIDBDatabase.h', 'public/WebIDBDatabaseError.h', + 'public/WebIDBFactory.h', 'public/WebIDBIndex.h', 'public/WebIDBKey.h', 'public/WebIDBObjectStore.h', - 'public/WebIndexedDatabase.h', 'public/WebInputElement.h', 'public/WebInputEvent.h', 'public/WebKit.h', @@ -321,12 +321,12 @@ 'src/IDBCallbacksProxy.h', 'src/IDBDatabaseProxy.cpp', 'src/IDBDatabaseProxy.h', - 'src/IDBIndexProxy.cpp', - 'src/IDBIndexProxy.h', + 'src/IDBFactoryBackendProxy.cpp', + 'src/IDBFactoryBackendProxy.h', + 'src/IDBIndexBackendProxy.cpp', + 'src/IDBIndexBackendProxy.h', 'src/IDBObjectStoreProxy.cpp', 'src/IDBObjectStoreProxy.h', - 'src/IndexedDatabaseProxy.cpp', - 'src/IndexedDatabaseProxy.h', 'src/InspectorClientImpl.cpp', 'src/InspectorClientImpl.h', 'src/InspectorFrontendClientImpl.cpp', @@ -417,6 +417,8 @@ 'src/WebIDBDatabaseError.cpp', 'src/WebIDBDatabaseImpl.cpp', 'src/WebIDBDatabaseImpl.h', + 'src/WebIDBFactoryImpl.cpp', + 'src/WebIDBFactoryImpl.h', 'src/WebIDBIndexImpl.cpp', 'src/WebIDBIndexImpl.h', 'src/WebIDBKey.cpp', @@ -425,8 +427,6 @@ 'src/WebImageCG.cpp', 'src/WebImageDecoder.cpp', 'src/WebImageSkia.cpp', - 'src/WebIndexedDatabaseImpl.cpp', - 'src/WebIndexedDatabaseImpl.h', 'src/WebInputElement.cpp', 'src/WebInputEvent.cpp', 'src/WebInputEventConversion.cpp', @@ -854,6 +854,13 @@ ] }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { + 'dependencies': [ + '<(chromium_src_dir)/build/linux/system.gyp:fontconfig', + '<(chromium_src_dir)/build/linux/system.gyp:gtk', + ], + 'include_dirs': [ + 'public/gtk', + ], 'copies': [{ 'destination': '<(PRODUCT_DIR)', 'files': [ diff --git a/WebKit/chromium/public/WebDOMStringList.h b/WebKit/chromium/public/WebDOMStringList.h index d88fcee..dabf1b7 100644 --- a/WebKit/chromium/public/WebDOMStringList.h +++ b/WebKit/chromium/public/WebDOMStringList.h @@ -46,7 +46,7 @@ class WebDOMStringList { public: ~WebDOMStringList() { reset(); } - WebDOMStringList(); + WEBKIT_API WebDOMStringList(); WebDOMStringList(const WebDOMStringList& l) { assign(l); } WebDOMStringList& operator=(const WebDOMStringList& l) { diff --git a/WebKit/chromium/public/WebIndexedDatabase.h b/WebKit/chromium/public/WebIDBFactory.h index 5517a0c..5eb6f58 100644..100755 --- a/WebKit/chromium/public/WebIndexedDatabase.h +++ b/WebKit/chromium/public/WebIDBFactory.h @@ -26,10 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebIndexedDatabase_h -#define WebIndexedDatabase_h +#ifndef WebIDBFactory_h +#define WebIDBFactory_h #include "WebCommon.h" +#include "WebDOMStringList.h" #include "WebIDBCallbacks.h" #include "WebSecurityOrigin.h" #include "WebString.h" @@ -41,14 +42,14 @@ class WebIDBDatabase; class WebString; class WebSecurityOrigin; -// The entry point into the IndexedDatabase API. These classes match their _____Request and -// _____Sync counterparts in the spec, but operate only in an async manner. +// The entry point into the IndexedDatabase API. These classes match their Foo and +// FooSync counterparts in the spec, but operate only in an async manner. // http://dev.w3.org/2006/webapi/WebSimpleDB/ -class WebIndexedDatabase { +class WebIDBFactory { public: - WEBKIT_API static WebIndexedDatabase* create(); + WEBKIT_API static WebIDBFactory* create(); - virtual ~WebIndexedDatabase() { } + virtual ~WebIDBFactory() { } // The WebKit implementation of open ignores the WebFrame* parameter. virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame) @@ -66,4 +67,4 @@ public: } // namespace WebKit -#endif // WebIndexedDatabase_h +#endif // WebIDBFactory_h diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index 48765ac..5959a1c 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -52,7 +52,7 @@ class WebCookieJar; class WebFileSystem; class WebGLES2Context; class WebGraphicsContext3D; -class WebIndexedDatabase; +class WebIDBFactory; class WebMessagePortChannel; class WebMimeRegistry; class WebPluginListBuilder; @@ -131,7 +131,7 @@ public: // Indexed Database ---------------------------------------------------- - virtual WebIndexedDatabase* indexedDatabase() { return 0; } + virtual WebIDBFactory* idbFactory() { return 0; } // Keygen -------------------------------------------------------------- diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h index 95307a2..517aad5 100644 --- a/WebKit/chromium/public/WebRuntimeFeatures.h +++ b/WebKit/chromium/public/WebRuntimeFeatures.h @@ -80,6 +80,9 @@ public: WEBKIT_API static void enableDeviceOrientation(bool); WEBKIT_API static bool isDeviceOrientationEnabled(); + WEBKIT_API static void enableSpeechInput(bool); + WEBKIT_API static bool isSpeechInputEnabled(); + private: WebRuntimeFeatures(); }; diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp index d43d88a..2a5c32e 100644 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/WebKit/chromium/src/ChromeClientImpl.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -55,7 +56,9 @@ #include "NotificationPresenterImpl.h" #include "Page.h" #include "PopupMenuChromium.h" +#include "SearchPopupMenuChromium.h" #include "ScriptController.h" +#include "SecurityOrigin.h" #include "WebGeolocationService.h" #if USE(V8) #include "V8Proxy.h" @@ -579,6 +582,11 @@ void ChromeClientImpl::reachedMaxAppCacheSize(int64_t spaceNeeded) { ASSERT_NOT_REACHED(); } + +void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin*) +{ + ASSERT_NOT_REACHED(); +} #endif void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser) @@ -734,7 +742,9 @@ void ChromeClientImpl::scheduleCompositingLayerSync() { m_webView->setRootLayerNeedsDisplay(); } +#endif +#if USE(GLES2_RENDERING) PassOwnPtr<GLES2Context> ChromeClientImpl::getOnscreenGLES2Context() { return m_webView->getOnscreenGLES2Context(); @@ -765,4 +775,19 @@ void ChromeClientImpl::exitFullscreenForNode(WebCore::Node* node) m_webView->client()->exitFullscreenForNode(WebNode(node)); } +bool ChromeClientImpl::selectItemWritingDirectionIsNatural() +{ + return false; +} + +PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new PopupMenuChromium(client)); +} + +PassRefPtr<SearchPopupMenu> ChromeClientImpl::createSearchPopupMenu(PopupMenuClient* client) const +{ + return adoptRef(new SearchPopupMenuChromium(client)); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h index e824381..7f3febf 100644 --- a/WebKit/chromium/src/ChromeClientImpl.h +++ b/WebKit/chromium/src/ChromeClientImpl.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -32,12 +33,15 @@ #define ChromeClientImpl_h #include "ChromeClientChromium.h" +#include "PopupMenu.h" +#include "SearchPopupMenu.h" namespace WebCore { class AccessibilityObject; class FileChooser; class HTMLParserQuirks; class PopupContainer; +class PopupMenuClient; class SecurityOrigin; struct WindowFeatures; } @@ -118,6 +122,7 @@ public: WebCore::Frame*, const WebCore::String& databaseName); #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); + virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*); #endif #if ENABLE(NOTIFICATIONS) virtual WebCore::NotificationPresenter* notificationPresenter() const; @@ -145,7 +150,9 @@ public: // Sets a flag to specify that the view needs to be updated, so we need // to do an eager layout before the drawing. virtual void scheduleCompositingLayerSync(); +#endif +#if USE(GLES2_RENDERING) virtual PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context(); virtual PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context(); #endif @@ -165,6 +172,10 @@ public: void setCursor(const WebCursorInfo& cursor); void setCursorForPlugin(const WebCursorInfo& cursor); + virtual bool selectItemWritingDirectionIsNatural(); + virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; + virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; + private: void getPopupMenuInfo(WebCore::PopupContainer*, WebPopupMenuInfo*); diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index 78e0693..397ea17 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -77,7 +77,7 @@ #include "Cookie.h" #include "FrameView.h" #include "GraphicsContext.h" -#include "IndexedDatabaseProxy.h" +#include "IDBFactoryBackendProxy.h" #include "KURL.h" #include "NotImplemented.h" #include "PlatformContextSkia.h" @@ -493,11 +493,11 @@ long long ChromiumBridge::databaseGetFileSize(const String& vfsFileName) // Indexed Database ----------------------------------------------------------- -PassRefPtr<IndexedDatabase> ChromiumBridge::indexedDatabase() +PassRefPtr<IDBFactoryBackendInterface> ChromiumBridge::idbFactory() { // There's no reason why we need to allocate a new proxy each time, but // there's also no strong reason not to. - return IndexedDatabaseProxy::create(); + return IDBFactoryBackendProxy::create(); } // Keygen --------------------------------------------------------------------- diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp index dae9348..b416e35 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -1488,6 +1488,12 @@ PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver() { WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( m_webFrame->frame()->loader()->activeDocumentLoader()); + if (!ds) { + // We can arrive here if a popstate event handler detaches this frame. + // FIXME: Remove this code once http://webkit.org/b/36202 is fixed. + ASSERT(!m_webFrame->frame()->page()); + return 0; + } return ds->releasePluginLoadObserver(); } diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp index 3591bee..4489e9b 100644 --- a/WebKit/chromium/src/IDBCallbacksProxy.cpp +++ b/WebKit/chromium/src/IDBCallbacksProxy.cpp @@ -75,9 +75,9 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatabase> idbDatabase) m_callbacks.clear(); } -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndex> idbIndex) +void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndexBackendInterface> backend) { - m_callbacks->onSuccess(new WebKit::WebIDBIndexImpl(idbIndex)); + m_callbacks->onSuccess(new WebKit::WebIDBIndexImpl(backend)); m_callbacks.clear(); } diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h index c5a8858..10fc31a 100644 --- a/WebKit/chromium/src/IDBCallbacksProxy.h +++ b/WebKit/chromium/src/IDBCallbacksProxy.h @@ -50,7 +50,7 @@ public: virtual void onError(PassRefPtr<IDBDatabaseError>); virtual void onSuccess(); // For "null". virtual void onSuccess(PassRefPtr<IDBDatabase>); - virtual void onSuccess(PassRefPtr<IDBIndex>); + virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>); virtual void onSuccess(PassRefPtr<IDBKey>); virtual void onSuccess(PassRefPtr<IDBObjectStore>); virtual void onSuccess(PassRefPtr<SerializedScriptValue>); diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp index bee99b2..44cbb40 100644..100755 --- a/WebKit/chromium/src/IndexedDatabaseProxy.cpp +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp @@ -27,15 +27,16 @@ */ #include "config.h" -#include "IndexedDatabaseProxy.h" +#include "IDBFactoryBackendProxy.h" +#include "DOMStringList.h" #include "IDBDatabaseError.h" #include "IDBDatabaseProxy.h" #include "WebFrameImpl.h" #include "WebIDBCallbacksImpl.h" #include "WebIDBDatabase.h" #include "WebIDBDatabaseError.h" -#include "WebIndexedDatabase.h" +#include "WebIDBFactory.h" #include "WebKit.h" #include "WebKitClient.h" @@ -43,24 +44,24 @@ namespace WebCore { -PassRefPtr<IndexedDatabase> IndexedDatabaseProxy::create() +PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendProxy::create() { - return adoptRef(new IndexedDatabaseProxy()); + return adoptRef(new IDBFactoryBackendProxy()); } -IndexedDatabaseProxy::IndexedDatabaseProxy() - : m_webIndexedDatabase(WebKit::webKitClient()->indexedDatabase()) +IDBFactoryBackendProxy::IDBFactoryBackendProxy() + : m_webIDBFactory(WebKit::webKitClient()->idbFactory()) { } -IndexedDatabaseProxy::~IndexedDatabaseProxy() +IDBFactoryBackendProxy::~IDBFactoryBackendProxy() { } -void IndexedDatabaseProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame) +void IDBFactoryBackendProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame) { WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); - m_webIndexedDatabase->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame); + m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame); } } // namespace WebCore diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h index 53097f0..969a9d7 100644..100755 --- a/WebKit/chromium/src/IndexedDatabaseProxy.h +++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h @@ -26,34 +26,37 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef IndexedDatabaseProxy_h -#define IndexedDatabaseProxy_h +#ifndef IDBFactoryBackendProxy_h +#define IDBFactoryBackendProxy_h -#include "IndexedDatabase.h" +#include "IDBFactoryBackendInterface.h" #if ENABLE(INDEXED_DATABASE) -namespace WebKit { class WebIndexedDatabase; } +namespace WebKit { class WebIDBFactory; } namespace WebCore { -class IndexedDatabaseProxy : public IndexedDatabase { +class DOMStringList; + +class IDBFactoryBackendProxy : public IDBFactoryBackendInterface { public: - static PassRefPtr<IndexedDatabase> create(); - virtual ~IndexedDatabaseProxy(); + static PassRefPtr<IDBFactoryBackendInterface> create(); + virtual ~IDBFactoryBackendProxy(); + PassRefPtr<DOMStringList> databases(void) const; virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*); private: - IndexedDatabaseProxy(); + IDBFactoryBackendProxy(); // We don't own this pointer (unlike all the other proxy classes which do). - WebKit::WebIndexedDatabase* m_webIndexedDatabase; + WebKit::WebIDBFactory* m_webIDBFactory; }; } // namespace WebCore #endif -#endif // IndexedDatabaseProxy_h +#endif // IDBFactoryBackendProxy_h diff --git a/WebKit/chromium/src/IDBIndexProxy.cpp b/WebKit/chromium/src/IDBIndexBackendProxy.cpp index f80eff3..5f1b9d9 100644 --- a/WebKit/chromium/src/IDBIndexProxy.cpp +++ b/WebKit/chromium/src/IDBIndexBackendProxy.cpp @@ -24,7 +24,7 @@ */ #include "config.h" -#include "IDBIndexProxy.h" +#include "IDBIndexBackendProxy.h" #include "WebIDBDatabaseError.h" #include "WebIDBIndex.h" @@ -33,31 +33,31 @@ namespace WebCore { -PassRefPtr<IDBIndex> IDBIndexProxy::create(PassOwnPtr<WebKit::WebIDBIndex> Index) +PassRefPtr<IDBIndexBackendInterface> IDBIndexBackendProxy::create(PassOwnPtr<WebKit::WebIDBIndex> index) { - return adoptRef(new IDBIndexProxy(Index)); + return adoptRef(new IDBIndexBackendProxy(index)); } -IDBIndexProxy::IDBIndexProxy(PassOwnPtr<WebKit::WebIDBIndex> Index) - : m_webIDBIndex(Index) +IDBIndexBackendProxy::IDBIndexBackendProxy(PassOwnPtr<WebKit::WebIDBIndex> index) + : m_webIDBIndex(index) { } -IDBIndexProxy::~IDBIndexProxy() +IDBIndexBackendProxy::~IDBIndexBackendProxy() { } -String IDBIndexProxy::name() +String IDBIndexBackendProxy::name() { return m_webIDBIndex->name(); } -String IDBIndexProxy::keyPath() +String IDBIndexBackendProxy::keyPath() { return m_webIDBIndex->keyPath(); } -bool IDBIndexProxy::unique() +bool IDBIndexBackendProxy::unique() { return m_webIDBIndex->unique(); } diff --git a/WebKit/chromium/src/IDBIndexProxy.h b/WebKit/chromium/src/IDBIndexBackendProxy.h index 35e6b30..1b378dd 100644 --- a/WebKit/chromium/src/IDBIndexProxy.h +++ b/WebKit/chromium/src/IDBIndexBackendProxy.h @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef IDBIndexProxy_h -#define IDBIndexProxy_h +#ifndef IDBIndexBackendProxy_h +#define IDBIndexBackendProxy_h -#include "IDBIndex.h" +#include "IDBIndexBackendInterface.h" #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> #if ENABLE(INDEXED_DATABASE) @@ -37,10 +36,10 @@ namespace WebKit { class WebIDBIndex; } namespace WebCore { -class IDBIndexProxy : public IDBIndex { +class IDBIndexBackendProxy : public IDBIndexBackendInterface { public: - static PassRefPtr<IDBIndex> create(PassOwnPtr<WebKit::WebIDBIndex>); - virtual ~IDBIndexProxy(); + static PassRefPtr<IDBIndexBackendInterface> create(PassOwnPtr<WebKit::WebIDBIndex>); + virtual ~IDBIndexBackendProxy(); virtual String name(); virtual String keyPath(); @@ -49,7 +48,7 @@ public: // FIXME: Add other methods. private: - IDBIndexProxy(PassOwnPtr<WebKit::WebIDBIndex>); + IDBIndexBackendProxy(PassOwnPtr<WebKit::WebIDBIndex>); OwnPtr<WebKit::WebIDBIndex> m_webIDBIndex; }; @@ -58,4 +57,4 @@ private: #endif -#endif // IDBIndexProxy_h +#endif // IDBIndexBackendProxy_h diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp index cec4ed3..858ed20 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp +++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp @@ -28,7 +28,7 @@ #include "DOMStringList.h" #include "IDBCallbacks.h" -#include "IDBIndexProxy.h" +#include "IDBIndexBackendProxy.h" #include "WebIDBCallbacksImpl.h" #include "WebIDBIndex.h" #include "WebIDBKey.h" @@ -88,12 +88,12 @@ void IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, m_webIDBObjectStore->createIndex(name, keyPath, unique, new WebIDBCallbacksImpl(callbacks)); } -PassRefPtr<IDBIndex> IDBObjectStoreProxy::index(const String& name) +PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::index(const String& name) { WebKit::WebIDBIndex* index = m_webIDBObjectStore->index(name); if (!index) return 0; - return IDBIndexProxy::create(index); + return IDBIndexBackendProxy::create(index); } void IDBObjectStoreProxy::removeIndex(const String& name, PassRefPtr<IDBCallbacks> callbacks) diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h index b8e4a01..b380bdc 100755 --- a/WebKit/chromium/src/IDBObjectStoreProxy.h +++ b/WebKit/chromium/src/IDBObjectStoreProxy.h @@ -37,9 +37,6 @@ namespace WebKit { class WebIDBObjectStore; } namespace WebCore { -class DOMStringList; -class IDBIndex; - class IDBObjectStoreProxy : public IDBObjectStore { public: static PassRefPtr<IDBObjectStore> create(PassOwnPtr<WebKit::WebIDBObjectStore>); @@ -54,7 +51,7 @@ public: void remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>); void createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks>); - PassRefPtr<IDBIndex> index(const String& name); + PassRefPtr<IDBIndexBackendInterface> index(const String& name); void removeIndex(const String& name, PassRefPtr<IDBCallbacks>); private: diff --git a/WebKit/chromium/src/SpeechInputClientImpl.cpp b/WebKit/chromium/src/SpeechInputClientImpl.cpp index 8bccacf..66525e3 100644 --- a/WebKit/chromium/src/SpeechInputClientImpl.cpp +++ b/WebKit/chromium/src/SpeechInputClientImpl.cpp @@ -42,10 +42,9 @@ namespace WebKit { SpeechInputClientImpl::SpeechInputClientImpl(WebViewClient* web_view_client) - : m_controller(web_view_client->speechInputController(this)) + : m_controller(web_view_client ? web_view_client->speechInputController(this) : 0) , m_listener(0) { - ASSERT(m_controller); } SpeechInputClientImpl::~SpeechInputClientImpl() diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp index 21c9eed..dbf7d85 100644 --- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp +++ b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp @@ -29,7 +29,7 @@ #include "IDBCallbacks.h" #include "IDBDatabaseError.h" #include "IDBDatabaseProxy.h" -#include "IDBIndexProxy.h" +#include "IDBIndexBackendProxy.h" #include "IDBKey.h" #include "IDBObjectStoreProxy.h" #include "WebIDBCallbacks.h" @@ -79,7 +79,7 @@ void WebIDBCallbacksImpl::onSuccess(const WebKit::WebIDBKey& key) void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBIndex* webKitInstance) { - m_callbacks->onSuccess(IDBIndexProxy::create(webKitInstance)); + m_callbacks->onSuccess(IDBIndexBackendProxy::create(webKitInstance)); m_callbacks.clear(); } diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp index 27a6247..5ac89f4 100644..100755 --- a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp +++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp @@ -29,10 +29,11 @@ */ #include "config.h" -#include "WebIndexedDatabaseImpl.h" +#include "WebIDBFactoryImpl.h" +#include "DOMStringList.h" #include "IDBCallbacksProxy.h" -#include "IndexedDatabaseImpl.h" +#include "IDBFactoryBackendImpl.h" #include "SecurityOrigin.h" #include "WebIDBDatabaseError.h" #include <wtf/OwnPtr.h> @@ -43,23 +44,23 @@ using namespace WebCore; namespace WebKit { -WebIndexedDatabase* WebIndexedDatabase::create() +WebIDBFactory* WebIDBFactory::create() { - return new WebIndexedDatabaseImpl(); + return new WebIDBFactoryImpl(); } -WebIndexedDatabaseImpl::WebIndexedDatabaseImpl() - : m_indexedDatabase(WebCore::IndexedDatabaseImpl::create()) +WebIDBFactoryImpl::WebIDBFactoryImpl() + : m_idbFactoryBackend(WebCore::IDBFactoryBackendImpl::create()) { } -WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl() +WebIDBFactoryImpl::~WebIDBFactoryImpl() { } -void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*) +void WebIDBFactoryImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*) { - m_indexedDatabase->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0); + m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0); } } // namespace WebKit diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h index 76781e5..c9ec9a3 100644..100755 --- a/WebKit/chromium/src/WebIndexedDatabaseImpl.h +++ b/WebKit/chromium/src/WebIDBFactoryImpl.h @@ -26,27 +26,28 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebIndexedDatabaseImpl_h -#define WebIndexedDatabaseImpl_h +#ifndef WebIDBFactoryImpl_h +#define WebIDBFactoryImpl_h -#include "WebIndexedDatabase.h" +#include "WebDOMStringList.h" +#include "WebIDBFactory.h" #include <wtf/RefPtr.h> -namespace WebCore { class IndexedDatabase; } +namespace WebCore { class IDBFactoryBackendInterface; } namespace WebKit { -class WebIndexedDatabaseImpl : public WebIndexedDatabase { +class WebIDBFactoryImpl : public WebIDBFactory { public: - WebIndexedDatabaseImpl(); - virtual ~WebIndexedDatabaseImpl(); + WebIDBFactoryImpl(); + virtual ~WebIDBFactoryImpl(); virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*); private: - WTF::RefPtr<WebCore::IndexedDatabase> m_indexedDatabase; + WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend; }; } // namespace WebKit -#endif // WebIndexedDatabaseImpl_h +#endif // WebIDBFactoryImpl_h diff --git a/WebKit/chromium/src/WebIDBIndexImpl.cpp b/WebKit/chromium/src/WebIDBIndexImpl.cpp index 304217c..777ec32 100644 --- a/WebKit/chromium/src/WebIDBIndexImpl.cpp +++ b/WebKit/chromium/src/WebIDBIndexImpl.cpp @@ -34,8 +34,8 @@ using namespace WebCore; namespace WebKit { -WebIDBIndexImpl::WebIDBIndexImpl(PassRefPtr<IDBIndex> idbIndex) - : m_idbIndex(idbIndex) +WebIDBIndexImpl::WebIDBIndexImpl(PassRefPtr<IDBIndexBackendInterface> backend) + : m_backend(backend) { } @@ -45,17 +45,17 @@ WebIDBIndexImpl::~WebIDBIndexImpl() WebString WebIDBIndexImpl::name() const { - return m_idbIndex->name(); + return m_backend->name(); } WebString WebIDBIndexImpl::keyPath() const { - return m_idbIndex->keyPath(); + return m_backend->keyPath(); } bool WebIDBIndexImpl::unique() const { - return m_idbIndex->unique(); + return m_backend->unique(); } } // namespace WebCore diff --git a/WebKit/chromium/src/WebIDBIndexImpl.h b/WebKit/chromium/src/WebIDBIndexImpl.h index e1f0538..73f3819 100644 --- a/WebKit/chromium/src/WebIDBIndexImpl.h +++ b/WebKit/chromium/src/WebIDBIndexImpl.h @@ -31,14 +31,14 @@ #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> -namespace WebCore { class IDBIndex; } +namespace WebCore { class IDBIndexBackendInterface; } namespace WebKit { // See comment in WebIndexedDatabase for a high level overview these classes. class WebIDBIndexImpl : public WebIDBIndex { public: - WebIDBIndexImpl(WTF::PassRefPtr<WebCore::IDBIndex> idbIndex); + WebIDBIndexImpl(WTF::PassRefPtr<WebCore::IDBIndexBackendInterface>); virtual ~WebIDBIndexImpl(); virtual WebString name() const; @@ -46,7 +46,7 @@ public: virtual bool unique() const; private: - WTF::RefPtr<WebCore::IDBIndex> m_idbIndex; + WTF::RefPtr<WebCore::IDBIndexBackendInterface> m_backend; }; } // namespace WebKit diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp index d8e98db..7b6a32a 100755 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp +++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp @@ -85,7 +85,7 @@ void WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name) { - RefPtr<IDBIndex> index = m_objectStore->index(name); + RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(name); if (!index) return 0; return new WebIDBIndexImpl(index); diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp index efb287c..217553b 100644 --- a/WebKit/chromium/src/WebRuntimeFeatures.cpp +++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp @@ -236,4 +236,14 @@ bool WebRuntimeFeatures::isDeviceOrientationEnabled() return RuntimeEnabledFeatures::deviceOrientationEnabled(); } +void WebRuntimeFeatures::enableSpeechInput(bool enable) +{ + RuntimeEnabledFeatures::setSpeechInputEnabled(enable); +} + +bool WebRuntimeFeatures::isSpeechInputEnabled() +{ + return RuntimeEnabledFeatures::speechInputEnabled(); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index bb6d07c..691f143 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -106,6 +106,7 @@ #include "WebPoint.h" #include "WebPopupMenuImpl.h" #include "WebRect.h" +#include "WebRuntimeFeatures.h" #include "WebSettingsImpl.h" #include "WebString.h" #include "WebVector.h" @@ -176,6 +177,9 @@ static const PopupContainerSettings autoFillPopupSettings = { WebView* WebView::create(WebViewClient* client, WebDevToolsAgentClient* devToolsClient) { + // Keep runtime flag for device orientation turned off until it's implemented. + WebRuntimeFeatures::enableDeviceOrientation(false); + // Pass the WebViewImpl's self-reference to the caller. return adoptRef(new WebViewImpl(client, devToolsClient)).leakRef(); } diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js index 640474b..674f1d7 100644 --- a/WebKit/chromium/src/js/DevTools.js +++ b/WebKit/chromium/src/js/DevTools.js @@ -165,8 +165,7 @@ WebInspector.loaded = function() Preferences.debuggerAlwaysEnabled = true; Preferences.profilerAlwaysEnabled = true; Preferences.canEditScriptSource = true; - Preferences.appCacheEnabled = false; - + if ("page" in WebInspector._paramsObject) { WebInspector.loadedDone = true; if (WebInspector.socketOpened) diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp index 44b262d..50319af 100644 --- a/WebKit/chromium/tests/PopupMenuTest.cpp +++ b/WebKit/chromium/tests/PopupMenuTest.cpp @@ -180,7 +180,7 @@ protected: { m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient, 0)); m_webView->initializeMainFrame(&m_webFrameClient); - m_popupMenu = PopupMenu::create(&m_popupMenuClient); + m_popupMenu = adoptRef(new PopupMenuChromium(&m_popupMenuClient)); } virtual void TearDown() |
