summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-18 13:59:13 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-18 13:59:28 +0200
commit4d6084feccab99c0a7b3ecef26bb49c41dd50201 (patch)
treefd1195897f551eee6d5a15d07ff5733b15aa2a5c /Source/WebKit/chromium/src
parentae901828d4689ab9e89113f6b6ea8042b37a9fda (diff)
downloadqtwebkit-4d6084feccab99c0a7b3ecef26bb49c41dd50201.tar.gz
Imported WebKit commit ff52235a78888e5cb8e286a828a8698042200e67 (http://svn.webkit.org/repository/webkit/trunk@122948)
New snapshot that should fix the rendering issues recently introduced
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r--Source/WebKit/chromium/src/BatteryClientImpl.h4
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.cpp25
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.h18
-rwxr-xr-xSource/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp10
-rw-r--r--Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h1
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.h4
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp7
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.h4
-rw-r--r--Source/WebKit/chromium/src/WebSpeechGrammar.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp8
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h3
12 files changed, 76 insertions, 18 deletions
diff --git a/Source/WebKit/chromium/src/BatteryClientImpl.h b/Source/WebKit/chromium/src/BatteryClientImpl.h
index a3b1fa5d8..96ab20f20 100644
--- a/Source/WebKit/chromium/src/BatteryClientImpl.h
+++ b/Source/WebKit/chromium/src/BatteryClientImpl.h
@@ -36,6 +36,8 @@
#include "BatteryClient.h"
#include "WebBatteryStatus.h"
+namespace WebCore { class BatteryController; }
+
namespace WebKit {
class WebBatteryStatusClient;
@@ -46,9 +48,9 @@ public:
virtual ~BatteryClientImpl() { }
void updateBatteryStatus(const WebBatteryStatus&);
+ void setController(WebCore::BatteryController*);
// WebCore::BatteryClient methods:
- virtual void setController(WebCore::BatteryController*) OVERRIDE;
virtual void startUpdating() OVERRIDE;
virtual void stopUpdating() OVERRIDE;
virtual void batteryControllerDestroyed() OVERRIDE;
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
index b2219454c..ed5d73e50 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -103,6 +103,7 @@
#include "WindowFeatures.h"
#include "WrappedResourceRequest.h"
#include <public/Platform.h>
+#include <wtf/text/CString.h>
#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringConcatenate.h>
#include <wtf/unicode/CharacterNames.h>
@@ -496,13 +497,6 @@ IntRect ChromeClientImpl::windowResizerRect() const
return result;
}
-#if ENABLE(REGISTER_PROTOCOL_HANDLER)
-void ChromeClientImpl::registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title)
-{
- m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
-}
-#endif
-
void ChromeClientImpl::invalidateRootView(const IntRect&, bool)
{
notImplemented();
@@ -1118,4 +1112,21 @@ bool ChromeClientImpl::isPointerLocked()
}
#endif
+#if ENABLE(REGISTER_PROTOCOL_HANDLER)
+PassOwnPtr<RegisterProtocolHandlerClientImpl> RegisterProtocolHandlerClientImpl::create(WebViewImpl* webView)
+{
+ return adoptPtr(new RegisterProtocolHandlerClientImpl(webView));
+}
+
+RegisterProtocolHandlerClientImpl::RegisterProtocolHandlerClientImpl(WebViewImpl* webView)
+ : m_webView(webView)
+{
+}
+
+void RegisterProtocolHandlerClientImpl::registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title)
+{
+ m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
+}
+#endif
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.h b/Source/WebKit/chromium/src/ChromeClientImpl.h
index 86ff7ba68..9aa8dff32 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.h
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.h
@@ -34,8 +34,10 @@
#include "ChromeClientChromium.h"
#include "PopupMenu.h"
+#include "RegisterProtocolHandlerClient.h"
#include "SearchPopupMenu.h"
#include "WebNavigationPolicy.h"
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
class AccessibilityObject;
@@ -107,9 +109,6 @@ public:
virtual bool shouldInterruptJavaScript();
virtual WebCore::KeyboardUIMode keyboardUIMode();
virtual WebCore::IntRect windowResizerRect() const;
-#if ENABLE(REGISTER_PROTOCOL_HANDLER)
- virtual void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title);
-#endif
virtual void invalidateRootView(const WebCore::IntRect&, bool);
virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool);
virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
@@ -235,6 +234,19 @@ private:
#endif
};
+class RegisterProtocolHandlerClientImpl : public WebCore::RegisterProtocolHandlerClient {
+public:
+ static PassOwnPtr<RegisterProtocolHandlerClientImpl> create(WebViewImpl*);
+ ~RegisterProtocolHandlerClientImpl() { }
+
+ virtual void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title) OVERRIDE;
+
+private:
+ explicit RegisterProtocolHandlerClientImpl(WebViewImpl*);
+
+ WebViewImpl* m_webView;
+};
+
} // namespace WebKit
#endif
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
index 42f808c85..826407330 100755
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
@@ -75,6 +75,16 @@ void IDBObjectStoreBackendProxy::put(PassRefPtr<SerializedScriptValue> value, Pa
m_webIDBObjectStore->put(value, key, static_cast<WebIDBObjectStore::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
+void IDBObjectStoreBackendProxy::putWithIndexKeys(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, const Vector<String>& indexNames, const Vector<IndexKeys>& indexKeys, 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);
+ WebVector<WebString> webIndexNames(indexNames);
+ WebVector<IndexKeys> webIndexKeys(indexKeys);
+ m_webIDBObjectStore->putWithIndexKeys(value, key, static_cast<WebIDBObjectStore::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), webIndexNames, webIndexKeys, ec);
+}
+
void IDBObjectStoreBackendProxy::deleteFunction(PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
index c666c9fc7..c64028cff 100644
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
@@ -45,6 +45,7 @@ public:
virtual void get(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void put(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
+ virtual void putWithIndexKeys(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, const WTF::Vector<WTF::String>&, const WTF::Vector<IndexKeys>&, WebCore::ExceptionCode&);
virtual void deleteFunction(PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
virtual void clear(PassRefPtr<WebCore::IDBCallbacks>, WebCore::IDBTransactionBackendInterface*, WebCore::ExceptionCode&);
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.cpp b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
index 025876446..6948982c8 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -65,10 +65,11 @@ void InspectorClientImpl::inspectorDestroyed()
agent->inspectorDestroyed();
}
-void InspectorClientImpl::openInspectorFrontend(InspectorController* controller)
+InspectorFrontendChannel* InspectorClientImpl::openInspectorFrontend(InspectorController* controller)
{
if (WebDevToolsAgentImpl* agent = devToolsAgent())
- agent->openInspectorFrontend(controller);
+ return agent->openInspectorFrontend(controller);
+ return 0;
}
void InspectorClientImpl::closeInspectorFrontend()
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.h b/Source/WebKit/chromium/src/InspectorClientImpl.h
index 5ea6baeb3..7abbd3bf5 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.h
@@ -33,6 +33,7 @@
#include "InspectorClient.h"
#include "InspectorController.h"
+#include "InspectorFrontendChannel.h"
#include "platform/WebThread.h"
#include <wtf/OwnPtr.h>
@@ -43,6 +44,7 @@ class WebDevToolsAgentImpl;
class WebViewImpl;
class InspectorClientImpl : public WebCore::InspectorClient,
+ public WebCore::InspectorFrontendChannel,
public WebThread::TaskObserver {
public:
InspectorClientImpl(WebViewImpl*);
@@ -50,7 +52,7 @@ public:
// InspectorClient methods:
virtual void inspectorDestroyed();
- virtual void openInspectorFrontend(WebCore::InspectorController*);
+ virtual WebCore::InspectorFrontendChannel* openInspectorFrontend(WebCore::InspectorController*);
virtual void closeInspectorFrontend();
virtual void bringFrontendToFront();
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 1bd1595b6..7a4617ddc 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -389,7 +389,7 @@ void WebDevToolsAgentImpl::attach()
return;
ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client);
- inspectorController()->connectFrontend();
+ inspectorController()->connectFrontend(this);
m_attached = true;
}
@@ -399,7 +399,7 @@ void WebDevToolsAgentImpl::reattach(const WebString& savedState)
return;
ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client);
- inspectorController()->restoreInspectorStateFromCookie(savedState);
+ inspectorController()->reconnectFrontend(this, savedState);
m_attached = true;
}
@@ -492,8 +492,9 @@ void WebDevToolsAgentImpl::inspectorDestroyed()
// Our lifetime is bound to the WebViewImpl.
}
-void WebDevToolsAgentImpl::openInspectorFrontend(InspectorController*)
+InspectorFrontendChannel* WebDevToolsAgentImpl::openInspectorFrontend(InspectorController*)
{
+ return 0;
}
void WebDevToolsAgentImpl::closeInspectorFrontend()
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 6b5247617..f1af576cb 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -32,6 +32,7 @@
#define WebDevToolsAgentImpl_h
#include "InspectorClient.h"
+#include "InspectorFrontendChannel.h"
#include "WebDevToolsAgentPrivate.h"
#include "WebPageOverlay.h"
@@ -65,6 +66,7 @@ struct WebDevToolsMessageData;
class WebDevToolsAgentImpl : public WebDevToolsAgentPrivate,
public WebCore::InspectorClient,
+ public WebCore::InspectorFrontendChannel,
public WebPageOverlay {
public:
WebDevToolsAgentImpl(WebViewImpl* webViewImpl, WebDevToolsAgentClient* client);
@@ -88,7 +90,7 @@ public:
// InspectorClient implementation.
virtual void inspectorDestroyed();
- virtual void openInspectorFrontend(WebCore::InspectorController*);
+ virtual WebCore::InspectorFrontendChannel* openInspectorFrontend(WebCore::InspectorController*);
virtual void closeInspectorFrontend();
virtual void bringFrontendToFront();
diff --git a/Source/WebKit/chromium/src/WebSpeechGrammar.cpp b/Source/WebKit/chromium/src/WebSpeechGrammar.cpp
index b28509de8..2a84767d4 100644
--- a/Source/WebKit/chromium/src/WebSpeechGrammar.cpp
+++ b/Source/WebKit/chromium/src/WebSpeechGrammar.cpp
@@ -36,6 +36,11 @@ void WebSpeechGrammar::reset()
m_private.reset();
}
+void WebSpeechGrammar::assign(const WebSpeechGrammar& other)
+{
+ m_private = other.m_private;
+}
+
WebSpeechGrammar::WebSpeechGrammar(const PassRefPtr<WebCore::SpeechGrammar>& value)
: m_private(value)
{
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 721bfc1d6..e349151fa 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -36,6 +36,7 @@
#include "AutofillPopupMenuClient.h"
#include "BackForwardListChromium.h"
#include "BatteryClientImpl.h"
+#include "BatteryController.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
#include "Color.h"
@@ -427,6 +428,9 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
#if ENABLE(MEDIA_STREAM)
, m_userMediaClientImpl(this)
#endif
+#if ENABLE(REGISTER_PROTOCOL_HANDLER)
+ , m_registerProtocolHandlerClient(RegisterProtocolHandlerClientImpl::create(this))
+#endif
, m_flingModifier(0)
{
// WebKit/win/WebView.cpp does the same thing, except they call the
@@ -456,6 +460,9 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
provideNotification(m_page.get(), notificationPresenterImpl());
#endif
+#if ENABLE(REGISTER_PROTOCOL_HANDLER)
+ provideRegisterProtocolHandlerTo(m_page.get(), m_registerProtocolHandlerClient.get());
+#endif
provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get());
provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get());
@@ -464,6 +471,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
#if ENABLE(BATTERY_STATUS)
provideBatteryTo(m_page.get(), m_batteryClient.get());
+ m_batteryClient->setController(BatteryController::from(m_page.get()));
#endif
m_page->setGroupName(pageGroupName);
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index 4596dcafc..8f6bdf40b 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -821,6 +821,9 @@ private:
#if ENABLE(MEDIA_STREAM)
UserMediaClientImpl m_userMediaClientImpl;
#endif
+#if ENABLE(REGISTER_PROTOCOL_HANDLER)
+ OwnPtr<RegisterProtocolHandlerClientImpl> m_registerProtocolHandlerClient;
+#endif
OwnPtr<WebCore::ActivePlatformGestureAnimation> m_gestureAnimation;
WebPoint m_lastWheelPosition;
WebPoint m_lastWheelGlobalPosition;