summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src')
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp2
-rw-r--r--WebKit/chromium/src/DatabaseObserver.cpp6
-rw-r--r--WebKit/chromium/src/DebuggerAgentManager.cpp51
-rw-r--r--WebKit/chromium/src/DebuggerAgentManager.h3
-rw-r--r--WebKit/chromium/src/EditorClientImpl.cpp1
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp14
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.cpp13
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.h2
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.cpp26
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.h9
-rw-r--r--WebKit/chromium/src/IDBIndexProxy.cpp67
-rw-r--r--WebKit/chromium/src/IDBIndexProxy.h61
-rw-r--r--WebKit/chromium/src/IndexedDatabaseProxy.cpp4
-rw-r--r--WebKit/chromium/src/IndexedDatabaseProxy.h2
-rw-r--r--WebKit/chromium/src/InspectorClientImpl.cpp61
-rw-r--r--WebKit/chromium/src/InspectorClientImpl.h5
-rw-r--r--WebKit/chromium/src/InspectorFrontendClientImpl.cpp2
-rw-r--r--WebKit/chromium/src/WebDOMStringList.cpp82
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp100
-rw-r--r--WebKit/chromium/src/WebDocument.cpp5
-rw-r--r--WebKit/chromium/src/WebFormControlElement.cpp4
-rw-r--r--WebKit/chromium/src/WebFormElement.cpp11
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp34
-rw-r--r--WebKit/chromium/src/WebGeolocationServiceMock.cpp24
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp51
-rw-r--r--WebKit/chromium/src/WebIDBCallbacksImpl.cpp18
-rw-r--r--WebKit/chromium/src/WebIDBCallbacksImpl.h19
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.cpp25
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.h8
-rw-r--r--WebKit/chromium/src/WebIDBIndexImpl.cpp63
-rw-r--r--WebKit/chromium/src/WebIDBIndexImpl.h54
-rw-r--r--WebKit/chromium/src/WebIndexedDatabaseImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebIndexedDatabaseImpl.h2
-rw-r--r--WebKit/chromium/src/WebNotification.cpp10
-rw-r--r--WebKit/chromium/src/WebPasswordFormUtils.cpp2
-rw-r--r--WebKit/chromium/src/WebPluginListBuilderImpl.cpp25
-rw-r--r--WebKit/chromium/src/WebPluginListBuilderImpl.h4
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp6
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp10
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.h2
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp40
-rw-r--r--WebKit/chromium/src/WebViewImpl.h6
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js10
-rw-r--r--WebKit/chromium/src/js/InspectorControllerImpl.js12
-rwxr-xr-xWebKit/chromium/src/js/devTools.css2
45 files changed, 736 insertions, 226 deletions
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 01e91a6..3b8e5fa 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -505,7 +505,7 @@ String ChromiumBridge::preferredExtensionForMIMEType(const String& mimeType)
// Plugin ---------------------------------------------------------------------
-bool ChromiumBridge::plugins(bool refresh, Vector<PluginInfo*>* results)
+bool ChromiumBridge::plugins(bool refresh, Vector<PluginInfo>* results)
{
WebPluginListBuilderImpl builder(results);
webKitClient()->getPluginList(refresh, &builder);
diff --git a/WebKit/chromium/src/DatabaseObserver.cpp b/WebKit/chromium/src/DatabaseObserver.cpp
index 1c5117c..be658fe 100644
--- a/WebKit/chromium/src/DatabaseObserver.cpp
+++ b/WebKit/chromium/src/DatabaseObserver.cpp
@@ -67,19 +67,19 @@ bool DatabaseObserver::canEstablishDatabase(ScriptExecutionContext* scriptExecut
void DatabaseObserver::databaseOpened(Database* database)
{
- ASSERT(isMainThread());
+ ASSERT(database->scriptExecutionContext()->isContextThread());
WebDatabase::observer()->databaseOpened(WebDatabase(database));
}
void DatabaseObserver::databaseModified(Database* database)
{
- ASSERT(isMainThread());
+ ASSERT(database->scriptExecutionContext()->isContextThread());
WebDatabase::observer()->databaseModified(WebDatabase(database));
}
void DatabaseObserver::databaseClosed(Database* database)
{
- ASSERT(isMainThread());
+ ASSERT(database->scriptExecutionContext()->isContextThread());
WebDatabase::observer()->databaseClosed(WebDatabase(database));
}
diff --git a/WebKit/chromium/src/DebuggerAgentManager.cpp b/WebKit/chromium/src/DebuggerAgentManager.cpp
index d3f7fea..a30675d 100644
--- a/WebKit/chromium/src/DebuggerAgentManager.cpp
+++ b/WebKit/chromium/src/DebuggerAgentManager.cpp
@@ -54,6 +54,8 @@ bool DebuggerAgentManager::s_inUtilityContext = false;
bool DebuggerAgentManager::s_debugBreakDelayed = false;
+bool DebuggerAgentManager::s_exposeV8DebuggerProtocol = false;
+
namespace {
class CallerIdWrapper : public v8::Debug::ClientData, public Noncopyable {
@@ -73,42 +75,6 @@ private:
} // namespace
-void DebuggerAgentManager::hostDispatchHandler(const Vector<WebCore::Page*>& pages)
-{
- if (!s_messageLoopDispatchHandler)
- return;
-
- if (s_inHostDispatchHandler)
- return;
-
- s_inHostDispatchHandler = true;
-
- Vector<WebViewImpl*> views;
- // 1. Disable active objects and input events.
- for (size_t i = 0; i < pages.size(); i++) {
- WebCore::Page* page = pages[i];
- WebViewImpl* view = WebViewImpl::fromPage(page);
- s_pageDeferrers.set(view , new WebCore::PageGroupLoadDeferrer(page, true));
- views.append(view);
- view->setIgnoreInputEvents(true);
- }
-
- // 2. Process messages.
- s_messageLoopDispatchHandler();
-
- // 3. Bring things back.
- for (Vector<WebViewImpl*>::iterator it = views.begin(); it != views.end(); ++it) {
- if (s_pageDeferrers.contains(*it)) {
- // The view was not closed during the dispatch.
- (*it)->setIgnoreInputEvents(false);
- }
- }
- deleteAllValues(s_pageDeferrers);
- s_pageDeferrers.clear();
-
- s_inHostDispatchHandler = false;
-}
-
void DebuggerAgentManager::debugHostDispatchHandler()
{
if (!s_messageLoopDispatchHandler || !s_attachedAgentsMap)
@@ -154,7 +120,8 @@ DebuggerAgentManager::AttachedAgentsMap* DebuggerAgentManager::s_attachedAgentsM
void DebuggerAgentManager::debugAttach(DebuggerAgentImpl* debuggerAgent)
{
#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
- return;
+ if (!s_exposeV8DebuggerProtocol)
+ return;
#endif
if (!s_attachedAgentsMap) {
s_attachedAgentsMap = new AttachedAgentsMap();
@@ -169,7 +136,8 @@ void DebuggerAgentManager::debugAttach(DebuggerAgentImpl* debuggerAgent)
void DebuggerAgentManager::debugDetach(DebuggerAgentImpl* debuggerAgent)
{
#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
- return;
+ if (!s_exposeV8DebuggerProtocol)
+ return;
#endif
if (!s_attachedAgentsMap) {
ASSERT_NOT_REACHED();
@@ -292,9 +260,14 @@ void DebuggerAgentManager::executeDebuggerCommand(const String& command, int cal
void DebuggerAgentManager::setMessageLoopDispatchHandler(WebDevToolsAgent::MessageLoopDispatchHandler handler)
{
s_messageLoopDispatchHandler = handler;
- WebCore::ScriptDebugServer::setMessageLoopDispatchHandler(DebuggerAgentManager::hostDispatchHandler);
}
+void DebuggerAgentManager::setExposeV8DebuggerProtocol(bool value)
+{
+ s_exposeV8DebuggerProtocol = value;
+}
+
+
void DebuggerAgentManager::setHostId(WebFrameImpl* webframe, int hostId)
{
ASSERT(hostId > 0);
diff --git a/WebKit/chromium/src/DebuggerAgentManager.h b/WebKit/chromium/src/DebuggerAgentManager.h
index a8bc7a3..dbb600a 100644
--- a/WebKit/chromium/src/DebuggerAgentManager.h
+++ b/WebKit/chromium/src/DebuggerAgentManager.h
@@ -70,6 +70,7 @@ public:
static void pauseScript();
static void executeDebuggerCommand(const WebCore::String& command, int callerId);
static void setMessageLoopDispatchHandler(WebDevToolsAgent::MessageLoopDispatchHandler handler);
+ static void setExposeV8DebuggerProtocol(bool);
// Sets |hostId| as the frame context data. This id is used to filter scripts
// related to the inspected page.
@@ -100,7 +101,6 @@ private:
DebuggerAgentManager();
~DebuggerAgentManager();
- static void hostDispatchHandler(const Vector<WebCore::Page*>&);
static void debugHostDispatchHandler();
static void onV8DebugMessage(const v8::Debug::Message& message);
static void sendCommandToV8(const WebCore::String& cmd,
@@ -120,6 +120,7 @@ private:
static bool s_inUtilityContext;
static bool s_debugBreakDelayed;
+ static bool s_exposeV8DebuggerProtocol;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp
index 4ecdcf7..4eda1f6 100644
--- a/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/WebKit/chromium/src/EditorClientImpl.cpp
@@ -705,6 +705,7 @@ bool EditorClientImpl::autofill(HTMLInputElement* inputElement,
m_autofillArgs.clear();
m_autofillTimer.stop();
+ // FIXME: Remove the extraneous isEnabledFormControl call below.
// Let's try to trigger autofill for that field, if applicable.
if (!inputElement->isEnabledFormControl() || !inputElement->isTextField()
|| inputElement->isPasswordField() || !inputElement->autoComplete()
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 17d9416..694d7c2 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1372,20 +1372,6 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
const String& mimeType,
bool loadManually)
{
-#if !OS(WINDOWS)
- // WebCore asks us to make a plugin even if we don't have a
- // registered handler, with a comment saying it's so we can display
- // the broken plugin icon. In Chromium, we normally register a
- // fallback plugin handler that allows you to install a missing
- // plugin. Since we don't yet have a default plugin handler, we
- // need to return null here rather than going through all the
- // plugin-creation IPCs only to discover we don't have a plugin
- // registered, which causes a crash.
- // FIXME: remove me once we have a default plugin.
- if (objectContentType(url, mimeType) != ObjectContentNetscapePlugin)
- return 0;
-#endif
-
if (!m_webFrame->client())
return 0;
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp
index 2bdf140..3e5f00a 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -34,6 +34,7 @@
#include "WebIDBCallbacks.h"
#include "WebIDBDatabaseImpl.h"
#include "WebIDBDatabaseError.h"
+#include "WebIDBIndexImpl.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -60,12 +61,24 @@ void IDBCallbacksProxy::onError(PassRefPtr<IDBDatabaseError> idbDatabaseError)
m_callbacks.clear();
}
+void IDBCallbacksProxy::onSuccess()
+{
+ m_callbacks->onSuccess();
+ m_callbacks.clear();
+}
+
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatabase> idbDatabase)
{
m_callbacks->onSuccess(new WebKit::WebIDBDatabaseImpl(idbDatabase));
m_callbacks.clear();
}
+void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndex> idbIndex)
+{
+ m_callbacks->onSuccess(new WebKit::WebIDBIndexImpl(idbIndex));
+ m_callbacks.clear();
+}
+
void IDBCallbacksProxy::onSuccess(PassRefPtr<SerializedScriptValue> serializedScriptValue)
{
m_callbacks->onSuccess(WebKit::WebSerializedScriptValue(serializedScriptValue));
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h
index 5d4bc0b..d98e2ed 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.h
+++ b/WebKit/chromium/src/IDBCallbacksProxy.h
@@ -51,7 +51,9 @@ public:
virtual ~IDBCallbacksProxy();
virtual void onError(PassRefPtr<IDBDatabaseError>);
+ virtual void onSuccess(); // For "null".
virtual void onSuccess(PassRefPtr<IDBDatabase>);
+ virtual void onSuccess(PassRefPtr<IDBIndex>);
virtual void onSuccess(PassRefPtr<SerializedScriptValue>);
private:
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index d12ec70..deb2f99 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -10,9 +10,6 @@
* 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -29,7 +26,7 @@
#include "config.h"
#include "IDBDatabaseProxy.h"
-#include "IDBDatabaseError.h"
+#include "DOMStringList.h"
#include "WebIDBDatabase.h"
#include "WebIDBDatabaseError.h"
@@ -51,7 +48,26 @@ IDBDatabaseProxy::~IDBDatabaseProxy()
{
}
+String IDBDatabaseProxy::name()
+{
+ return m_webIDBDatabase->name();
+}
+
+String IDBDatabaseProxy::description()
+{
+ return m_webIDBDatabase->description();
+}
+
+String IDBDatabaseProxy::version()
+{
+ return m_webIDBDatabase->version();
+}
+
+PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStores()
+{
+ return m_webIDBDatabase->objectStores();
+}
+
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
-
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index ac96a15..e5e5125 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -10,9 +10,6 @@
* 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -45,6 +42,11 @@ public:
static PassRefPtr<IDBDatabase> create(PassOwnPtr<WebKit::WebIDBDatabase>);
virtual ~IDBDatabaseProxy();
+ virtual String name();
+ virtual String description();
+ virtual String version();
+ virtual PassRefPtr<DOMStringList> objectStores();
+
// FIXME: Add other methods.
private:
@@ -58,4 +60,3 @@ private:
#endif
#endif // IDBDatabaseProxy_h
-
diff --git a/WebKit/chromium/src/IDBIndexProxy.cpp b/WebKit/chromium/src/IDBIndexProxy.cpp
new file mode 100644
index 0000000..f80eff3
--- /dev/null
+++ b/WebKit/chromium/src/IDBIndexProxy.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 "IDBIndexProxy.h"
+
+#include "WebIDBDatabaseError.h"
+#include "WebIDBIndex.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+PassRefPtr<IDBIndex> IDBIndexProxy::create(PassOwnPtr<WebKit::WebIDBIndex> Index)
+{
+ return adoptRef(new IDBIndexProxy(Index));
+}
+
+IDBIndexProxy::IDBIndexProxy(PassOwnPtr<WebKit::WebIDBIndex> Index)
+ : m_webIDBIndex(Index)
+{
+}
+
+IDBIndexProxy::~IDBIndexProxy()
+{
+}
+
+String IDBIndexProxy::name()
+{
+ return m_webIDBIndex->name();
+}
+
+String IDBIndexProxy::keyPath()
+{
+ return m_webIDBIndex->keyPath();
+}
+
+bool IDBIndexProxy::unique()
+{
+ return m_webIDBIndex->unique();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBIndexProxy.h b/WebKit/chromium/src/IDBIndexProxy.h
new file mode 100644
index 0000000..35e6b30
--- /dev/null
+++ b/WebKit/chromium/src/IDBIndexProxy.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef IDBIndexProxy_h
+#define IDBIndexProxy_h
+
+#include "IDBIndex.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebKit { class WebIDBIndex; }
+
+namespace WebCore {
+
+class IDBIndexProxy : public IDBIndex {
+public:
+ static PassRefPtr<IDBIndex> create(PassOwnPtr<WebKit::WebIDBIndex>);
+ virtual ~IDBIndexProxy();
+
+ virtual String name();
+ virtual String keyPath();
+ virtual bool unique();
+
+ // FIXME: Add other methods.
+
+private:
+ IDBIndexProxy(PassOwnPtr<WebKit::WebIDBIndex>);
+
+ OwnPtr<WebKit::WebIDBIndex> m_webIDBIndex;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBIndexProxy_h
diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.cpp b/WebKit/chromium/src/IndexedDatabaseProxy.cpp
index aed7c13..2572877 100644
--- a/WebKit/chromium/src/IndexedDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IndexedDatabaseProxy.cpp
@@ -57,12 +57,12 @@ IndexedDatabaseProxy::~IndexedDatabaseProxy()
{
}
-void IndexedDatabaseProxy::open(const String& name, const String& description, bool modifyDatabase, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, ExceptionCode& ec)
+void IndexedDatabaseProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, ExceptionCode& ec)
{
if (!frame || !frame->document())
return;
WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame);
- m_webIndexedDatabase->open(name, description, modifyDatabase, new WebIDBCallbacksImpl(callbacks), origin, webFrame, ec);
+ m_webIndexedDatabase->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame, ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.h b/WebKit/chromium/src/IndexedDatabaseProxy.h
index e372e9a..206099c 100644
--- a/WebKit/chromium/src/IndexedDatabaseProxy.h
+++ b/WebKit/chromium/src/IndexedDatabaseProxy.h
@@ -42,7 +42,7 @@ public:
static PassRefPtr<IndexedDatabase> create();
virtual ~IndexedDatabaseProxy();
- virtual void open(const String& name, const String& description, bool modifyDatabase, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, ExceptionCode&);
+ virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, ExceptionCode&);
private:
IndexedDatabaseProxy();
diff --git a/WebKit/chromium/src/InspectorClientImpl.cpp b/WebKit/chromium/src/InspectorClientImpl.cpp
index f69ef72..22b515f 100644
--- a/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -33,10 +33,8 @@
#include "DOMWindow.h"
#include "FloatRect.h"
-#include "InspectorController.h"
#include "NotImplemented.h"
#include "Page.h"
-#include "Settings.h"
#include "WebRect.h"
#include "WebURL.h"
#include "WebURLRequest.h"
@@ -94,65 +92,14 @@ void InspectorClientImpl::hideHighlight()
void InspectorClientImpl::populateSetting(const String& key, String* value)
{
- loadSettings();
- if (m_settings->contains(key))
- *value = m_settings->get(key);
+ WebString string;
+ m_inspectedWebView->inspectorSetting(key, &string);
+ *value = string;
}
void InspectorClientImpl::storeSetting(const String& key, const String& value)
{
- loadSettings();
- m_settings->set(key, value);
- saveSettings();
-}
-
-void InspectorClientImpl::loadSettings()
-{
- if (m_settings)
- return;
-
- m_settings.set(new SettingsMap);
- String data = m_inspectedWebView->inspectorSettings();
- if (data.isEmpty())
- return;
-
- Vector<String> entries;
- data.split("\n", entries);
- for (Vector<String>::iterator it = entries.begin(); it != entries.end(); ++it) {
- Vector<String> tokens;
- it->split(":", tokens);
- if (tokens.size() < 3)
- continue;
-
- String name = decodeURLEscapeSequences(tokens[0]);
- String type = tokens[1];
- String value = tokens[2];
- for (size_t i = 3; i < tokens.size(); ++i)
- value += ":" + tokens[i];
-
- if (type == "string")
- value = decodeURLEscapeSequences(value);
-
- m_settings->set(name, value);
- }
-}
-
-void InspectorClientImpl::saveSettings()
-{
- String data;
- for (SettingsMap::iterator it = m_settings->begin(); it != m_settings->end(); ++it) {
- String name = encodeWithURLEscapeSequences(it->first);
- String value = it->second;
- String entry = String::format(
- "%s:string:%s",
- name.utf8().data(),
- encodeWithURLEscapeSequences(value).utf8().data());
- data.append(entry);
- data.append("\n");
- }
- m_inspectedWebView->setInspectorSettings(data);
- if (m_inspectedWebView->client())
- m_inspectedWebView->client()->didUpdateInspectorSettings();
+ m_inspectedWebView->setInspectorSetting(key, value);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/InspectorClientImpl.h b/WebKit/chromium/src/InspectorClientImpl.h
index ccbcef7..7447d0c 100644
--- a/WebKit/chromium/src/InspectorClientImpl.h
+++ b/WebKit/chromium/src/InspectorClientImpl.h
@@ -56,14 +56,9 @@ public:
const WebCore::String& value);
private:
- void loadSettings();
- void saveSettings();
// The WebViewImpl of the page being inspected; gets passed to the constructor
WebViewImpl* m_inspectedWebView;
-
- typedef HashMap<WebCore::String, WebCore::String> SettingsMap;
- OwnPtr<SettingsMap> m_settings;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index 9ff3938..6f7ed95 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -90,6 +90,8 @@ String InspectorFrontendClientImpl::localizedStringsURL()
String InspectorFrontendClientImpl::hiddenPanels()
{
+ if (m_client->shouldHideScriptsPanel())
+ return "scripts";
return "";
}
diff --git a/WebKit/chromium/src/WebDOMStringList.cpp b/WebKit/chromium/src/WebDOMStringList.cpp
new file mode 100644
index 0000000..cd145bf
--- /dev/null
+++ b/WebKit/chromium/src/WebDOMStringList.cpp
@@ -0,0 +1,82 @@
+/*
+ * 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 "WebDOMStringList.h"
+
+#include "DOMStringList.h"
+#include "WebString.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebDOMStringList::reset()
+{
+ m_private.reset();
+}
+
+void WebDOMStringList::assign(const WebDOMStringList& other)
+{
+ m_private = other.m_private;
+}
+
+void WebDOMStringList::append(const WebString& string)
+{
+ m_private->append(string);
+}
+
+unsigned WebDOMStringList::length() const
+{
+ return m_private->length();
+}
+
+WebString WebDOMStringList::item(unsigned index) const
+{
+ return m_private->item(index);
+}
+
+WebDOMStringList::WebDOMStringList(const WTF::PassRefPtr<WebCore::DOMStringList>& item)
+ : m_private(item)
+{
+}
+
+WebDOMStringList& WebDOMStringList::operator=(const WTF::PassRefPtr<WebCore::DOMStringList>& item)
+{
+ m_private = item;
+ return *this;
+}
+
+WebDOMStringList::operator WTF::PassRefPtr<WebCore::DOMStringList>() const
+{
+ return m_private.get();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 0969d37..8dde31f 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -43,11 +43,13 @@
#include "InspectorResource.h"
#include "Node.h"
#include "Page.h"
+#include "PageGroup.h"
#include "PlatformString.h"
#include "ProfilerAgentImpl.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
+#include "ScriptDebugServer.h"
#include "ScriptObject.h"
#include "ScriptState.h"
#include "ScriptValue.h"
@@ -129,6 +131,90 @@ public:
}
};
+class ClientMessageLoopAdapter : public WebCore::ScriptDebugServer::ClientMessageLoop {
+public:
+ static void ensureClientMessageLoopCreated(WebDevToolsAgentClient* client)
+ {
+ if (s_instance)
+ return;
+ s_instance = new ClientMessageLoopAdapter(client->createClientMessageLoop());
+ WebCore::ScriptDebugServer::shared().setClientMessageLoop(s_instance);
+ }
+
+ static void inspectedViewClosed(WebViewImpl* view)
+ {
+ if (s_instance)
+ s_instance->m_frozenViews.remove(view);
+ }
+
+ static void didNavigate()
+ {
+ // Release render thread if necessary.
+ if (s_instance && s_instance->m_running)
+ WebCore::ScriptDebugServer::shared().continueProgram();
+ }
+
+private:
+ ClientMessageLoopAdapter(PassOwnPtr<WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop> messageLoop)
+ : m_running(false)
+ , m_messageLoop(messageLoop) { }
+
+
+ virtual void run(Page* page)
+ {
+ if (m_running)
+ return;
+ m_running = true;
+
+ Vector<WebViewImpl*> views;
+
+ // 1. Disable input events.
+ HashSet<Page*>::const_iterator end = page->group().pages().end();
+ for (HashSet<Page*>::const_iterator it = page->group().pages().begin(); it != end; ++it) {
+ WebViewImpl* view = WebViewImpl::fromPage(*it);
+ m_frozenViews.add(view);
+ views.append(view);
+ view->setIgnoreInputEvents(true);
+ }
+
+ // 2. Disable active objects
+ WebView::willEnterModalLoop();
+
+ // 3. Process messages until quitNow is called.
+ m_messageLoop->run();
+
+ // 4. Resume active objects
+ WebView::didExitModalLoop();
+
+ // 5. Resume input events.
+ for (Vector<WebViewImpl*>::iterator it = views.begin(); it != views.end(); ++it) {
+ if (m_frozenViews.contains(*it)) {
+ // The view was not closed during the dispatch.
+ (*it)->setIgnoreInputEvents(false);
+ }
+ }
+
+ // 6. All views have been resumed, clear the set.
+ m_frozenViews.clear();
+
+ m_running = false;
+ }
+
+ virtual void quitNow()
+ {
+ m_messageLoop->quitNow();
+ }
+
+ bool m_running;
+ OwnPtr<WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop> m_messageLoop;
+ typedef HashSet<WebViewImpl*> FrozenViewsSet;
+ FrozenViewsSet m_frozenViews;
+ static ClientMessageLoopAdapter* s_instance;
+
+};
+
+ClientMessageLoopAdapter* ClientMessageLoopAdapter::s_instance = 0;
+
} // namespace
WebDevToolsAgentImpl::WebDevToolsAgentImpl(
@@ -141,6 +227,8 @@ WebDevToolsAgentImpl::WebDevToolsAgentImpl(
, m_resourceTrackingWasEnabled(false)
, m_attached(false)
{
+ DebuggerAgentManager::setExposeV8DebuggerProtocol(
+ client->exposeV8DebuggerProtocol());
m_debuggerAgentDelegateStub.set(new DebuggerAgentDelegateStub(this));
m_toolsAgentDelegateStub.set(new ToolsAgentDelegateStub(this));
m_apuAgentDelegateStub.set(new ApuAgentDelegateStub(this));
@@ -149,6 +237,9 @@ WebDevToolsAgentImpl::WebDevToolsAgentImpl(
WebDevToolsAgentImpl::~WebDevToolsAgentImpl()
{
DebuggerAgentManager::onWebViewClosed(m_webViewImpl);
+#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
+ ClientMessageLoopAdapter::inspectedViewClosed(m_webViewImpl);
+#endif
disposeUtilityContext();
}
@@ -164,6 +255,12 @@ void WebDevToolsAgentImpl::attach()
{
if (m_attached)
return;
+
+#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
+ if (!m_client->exposeV8DebuggerProtocol())
+ ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client);
+#endif
+
m_debuggerAgentImpl.set(
new DebuggerAgentImpl(m_webViewImpl,
m_debuggerAgentDelegateStub.get(),
@@ -203,6 +300,9 @@ void WebDevToolsAgentImpl::detach()
void WebDevToolsAgentImpl::didNavigate()
{
+#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
+ ClientMessageLoopAdapter::didNavigate();
+#endif
DebuggerAgentManager::onNavigate();
}
diff --git a/WebKit/chromium/src/WebDocument.cpp b/WebKit/chromium/src/WebDocument.cpp
index 21e2bb8..017716d 100644
--- a/WebKit/chromium/src/WebDocument.cpp
+++ b/WebKit/chromium/src/WebDocument.cpp
@@ -62,6 +62,11 @@ bool WebDocument::isHTMLDocument() const
return constUnwrap<Document>()->isHTMLDocument();
}
+bool WebDocument::isXHTMLDocument() const
+{
+ return constUnwrap<Document>()->isXHTMLDocument();
+}
+
bool WebDocument::isPluginDocument() const
{
return constUnwrap<Document>()->isPluginDocument();
diff --git a/WebKit/chromium/src/WebFormControlElement.cpp b/WebKit/chromium/src/WebFormControlElement.cpp
index 0530776..007673e 100644
--- a/WebKit/chromium/src/WebFormControlElement.cpp
+++ b/WebKit/chromium/src/WebFormControlElement.cpp
@@ -45,12 +45,12 @@ bool WebFormControlElement::isEnabled() const
WebString WebFormControlElement::formControlName() const
{
- return constUnwrap<HTMLFormControlElement>()->formControlName();
+ return constUnwrap<HTMLFormControlElement>()->name();
}
WebString WebFormControlElement::formControlType() const
{
- return constUnwrap<HTMLFormControlElement>()->formControlType();
+ return constUnwrap<HTMLFormControlElement>()->type();
}
WebString WebFormControlElement::nameForAutofill() const
diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp
index 7952479..8b4ce04 100644
--- a/WebKit/chromium/src/WebFormElement.cpp
+++ b/WebKit/chromium/src/WebFormElement.cpp
@@ -82,10 +82,13 @@ void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re
{
const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
Vector<RefPtr<HTMLFormControlElement> > tempVector;
- for (size_t i = 0; i < form->formElements.size(); i++) {
- if (form->formElements[i]->hasLocalName(HTMLNames::inputTag)
- || form->formElements[i]->hasLocalName(HTMLNames::selectTag))
- tempVector.append(form->formElements[i]);
+ // FIXME: We should move the for-loop condition into a variable instead of
+ // re-evaluating size each time. Also, consider refactoring this code so that
+ // we don't call form->associatedElements() multiple times.
+ for (size_t i = 0; i < form->associatedElements().size(); i++) {
+ if (form->associatedElements()[i]->hasLocalName(HTMLNames::inputTag)
+ || form->associatedElements()[i]->hasLocalName(HTMLNames::selectTag))
+ tempVector.append(form->associatedElements()[i]);
}
result.assign(tempVector);
}
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index b678459..bb1f6ce 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -75,21 +75,20 @@
#include "ChromiumBridge.h"
#include "ClipboardUtilitiesChromium.h"
#include "Console.h"
+#include "DOMUtilitiesPrivate.h"
+#include "DOMWindow.h"
#include "Document.h"
#include "DocumentFragment.h" // Only needed for ReplaceSelectionCommand.h :(
#include "DocumentLoader.h"
#include "DocumentMarker.h"
-#include "DOMUtilitiesPrivate.h"
-#include "DOMWindow.h"
#include "Editor.h"
#include "EventHandler.h"
#include "FormState.h"
-#include "FrameLoader.h"
#include "FrameLoadRequest.h"
+#include "FrameLoader.h"
#include "FrameTree.h"
#include "FrameView.h"
#include "GraphicsContext.h"
-#include "HistoryItem.h"
#include "HTMLCollection.h"
#include "HTMLFormElement.h"
#include "HTMLFrameOwnerElement.h"
@@ -97,8 +96,8 @@
#include "HTMLInputElement.h"
#include "HTMLLinkElement.h"
#include "HTMLNames.h"
+#include "HistoryItem.h"
#include "InspectorController.h"
-#include "markup.h"
#include "Page.h"
#include "PlatformContextSkia.h"
#include "PluginDocument.h"
@@ -113,8 +112,8 @@
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "ScriptValue.h"
-#include "ScrollbarTheme.h"
#include "ScrollTypes.h"
+#include "ScrollbarTheme.h"
#include "SelectionController.h"
#include "Settings.h"
#include "SkiaUtils.h"
@@ -141,6 +140,7 @@
#include "WebVector.h"
#include "WebViewImpl.h"
#include "XPathResult.h"
+#include "markup.h"
#include <algorithm>
#include <wtf/CurrentTime.h>
@@ -1100,11 +1100,11 @@ bool WebFrameImpl::executeCommand(const WebString& name)
// support.
if (command == "DeleteToEndOfParagraph") {
Editor* editor = frame()->editor();
- if (!editor->deleteWithDirection(SelectionController::FORWARD,
+ if (!editor->deleteWithDirection(SelectionController::DirectionForward,
ParagraphBoundary,
true,
false)) {
- editor->deleteWithDirection(SelectionController::FORWARD,
+ editor->deleteWithDirection(SelectionController::DirectionForward,
CharacterGranularity,
true,
false);
@@ -1290,7 +1290,7 @@ bool WebFrameImpl::find(int identifier,
if (!options.findNext)
frame()->page()->unmarkAllTextMatches();
else
- setMarkerActive(m_activeMatch.get(), false); // Active match is changing.
+ setMarkerActive(m_activeMatch.get(), false); // Active match is changing.
// Starts the search from the current selection.
bool startInSelection = true;
@@ -1330,7 +1330,7 @@ bool WebFrameImpl::find(int identifier,
else {
m_activeMatch = newSelection.toNormalizedRange();
currSelectionRect = m_activeMatch->boundingBox();
- setMarkerActive(m_activeMatch.get(), true); // Active.
+ setMarkerActive(m_activeMatch.get(), true); // Active.
// WebKit draws the highlighting for all matches.
executeCommand(WebString::fromUTF8("Unselect"));
}
@@ -1425,7 +1425,7 @@ void WebFrameImpl::scopeStringMatches(int identifier,
identifier,
searchText,
options,
- false); // false=we just reset, so don't do it again.
+ false); // false=we just reset, so don't do it again.
return;
}
@@ -1439,7 +1439,7 @@ void WebFrameImpl::scopeStringMatches(int identifier,
m_resumeScopingFromRange->startOffset(ec2) + 1,
ec);
if (ec || ec2) {
- if (ec2) // A non-zero |ec| happens when navigating during search.
+ if (ec2) // A non-zero |ec| happens when navigating during search.
ASSERT_NOT_REACHED();
return;
}
@@ -1448,7 +1448,7 @@ void WebFrameImpl::scopeStringMatches(int identifier,
// This timeout controls how long we scope before releasing control. This
// value does not prevent us from running for longer than this, but it is
// periodically checked to see if we have exceeded our allocated time.
- const double maxScopingDuration = 0.1; // seconds
+ const double maxScopingDuration = 0.1; // seconds
int matchCount = 0;
bool timedOut = false;
@@ -1555,8 +1555,8 @@ void WebFrameImpl::scopeStringMatches(int identifier,
identifier,
searchText,
options,
- false); // don't reset.
- return; // Done for now, resume work later.
+ false); // don't reset.
+ return; // Done for now, resume work later.
}
// This frame has no further scoping left, so it is done. Other frames might,
@@ -1738,7 +1738,7 @@ PassRefPtr<Frame> WebFrameImpl::createChildFrame(
// it is necessary to check the value after calling init() and
// return without loading URL.
// (b:791612)
- childFrame->init(); // create an empty document
+ childFrame->init(); // create an empty document
if (!childFrame->tree()->parent())
return 0;
@@ -2065,7 +2065,7 @@ bool WebFrameImpl::shouldScopeMatches(const String& searchText)
searchText.substring(0, m_lastSearchString.length());
if (previousSearchPrefix == m_lastSearchString)
- return false; // Don't search this frame, it will be fruitless.
+ return false; // Don't search this frame, it will be fruitless.
}
return true;
diff --git a/WebKit/chromium/src/WebGeolocationServiceMock.cpp b/WebKit/chromium/src/WebGeolocationServiceMock.cpp
index 2eed352..00d819b 100644
--- a/WebKit/chromium/src/WebGeolocationServiceMock.cpp
+++ b/WebKit/chromium/src/WebGeolocationServiceMock.cpp
@@ -36,6 +36,7 @@
#include "GeolocationServiceMock.h"
#include "WebString.h"
#include <wtf/CurrentTime.h>
+#include <wtf/HashMap.h>
#if ENABLE(GEOLOCATION)
@@ -121,8 +122,25 @@ void GeolocationServiceChromiumMock::geolocationServiceErrorOccurred(Geolocation
namespace WebKit {
+class WebGeolocationServiceMockImpl : public WebGeolocationServiceMock {
+public:
+ virtual ~WebGeolocationServiceMockImpl() { }
+ virtual void requestPermissionForFrame(int bridgeId, const WebURL& url);
+ virtual int attachBridge(WebGeolocationServiceBridge*);
+ virtual void detachBridge(int bridgeId);
+
+private:
+ typedef HashMap<int, WebGeolocationServiceBridge*> IdToBridgeMap;
+ IdToBridgeMap m_idToBridgeMap;
+};
+
bool WebGeolocationServiceMock::s_mockGeolocationPermission = false;
+WebGeolocationServiceMock* WebGeolocationServiceMock::createWebGeolocationServiceMock()
+{
+ return new WebGeolocationServiceMockImpl;
+}
+
void WebGeolocationServiceMock::setMockGeolocationPermission(bool allowed)
{
s_mockGeolocationPermission = allowed;
@@ -142,7 +160,7 @@ void WebGeolocationServiceMock::setMockGeolocationError(int errorCode, const Web
GeolocationServiceMock::setError(positionError);
}
-void WebGeolocationServiceMock::requestPermissionForFrame(int bridgeId, const WebURL& url)
+void WebGeolocationServiceMockImpl::requestPermissionForFrame(int bridgeId, const WebURL& url)
{
IdToBridgeMap::iterator iter = m_idToBridgeMap.find(bridgeId);
if (iter == m_idToBridgeMap.end())
@@ -150,7 +168,7 @@ void WebGeolocationServiceMock::requestPermissionForFrame(int bridgeId, const We
iter->second->setIsAllowed(s_mockGeolocationPermission);
}
-int WebGeolocationServiceMock::attachBridge(WebGeolocationServiceBridge* bridge)
+int WebGeolocationServiceMockImpl::attachBridge(WebGeolocationServiceBridge* bridge)
{
static int nextAvailableWatchId = 1;
// In case of overflow, make sure the ID remains positive, but reuse the ID values.
@@ -160,7 +178,7 @@ int WebGeolocationServiceMock::attachBridge(WebGeolocationServiceBridge* bridge)
return nextAvailableWatchId++;
}
-void WebGeolocationServiceMock::detachBridge(int bridgeId)
+void WebGeolocationServiceMockImpl::detachBridge(int bridgeId)
{
m_idToBridgeMap.remove(bridgeId);
}
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index e7e0c32..4d24ea9 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -593,6 +593,50 @@ void WebGraphicsContext3DDefaultImpl::reshape(int width, int height)
notImplemented();
}
+ if (m_attributes.antialias) {
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_multisampleFBO);
+ if (m_boundFBO == m_multisampleFBO)
+ mustRestoreFBO = false;
+ }
+
+ // Initialize renderbuffers to 0.
+ GLboolean colorMask[] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE}, depthMask = GL_TRUE, stencilMask = GL_TRUE;
+ GLboolean isScissorEnabled = GL_FALSE;
+ GLboolean isDitherEnabled = GL_FALSE;
+ GLbitfield clearMask = GL_COLOR_BUFFER_BIT;
+ glGetBooleanv(GL_COLOR_WRITEMASK, colorMask);
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ if (m_attributes.depth) {
+ 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);
+ clearMask |= GL_STENCIL_BUFFER_BIT;
+ }
+ isScissorEnabled = glIsEnabled(GL_SCISSOR_TEST);
+ glDisable(GL_SCISSOR_TEST);
+ isDitherEnabled = glIsEnabled(GL_DITHER);
+ glDisable(GL_DITHER);
+
+ glClear(clearMask);
+
+ glColorMask(colorMask[0], colorMask[1], colorMask[2], colorMask[3]);
+ if (m_attributes.depth)
+ glDepthMask(depthMask);
+ if (m_attributes.stencil)
+ glStencilMask(stencilMask);
+ if (isScissorEnabled)
+ glEnable(GL_SCISSOR_TEST);
+ else
+ glDisable(GL_SCISSOR_TEST);
+ if (isDitherEnabled)
+ glEnable(GL_DITHER);
+ else
+ glDisable(GL_DITHER);
+
if (mustRestoreFBO)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
#endif // RENDER_TO_DEBUGGING_WINDOW
@@ -604,13 +648,6 @@ void WebGraphicsContext3DDefaultImpl::reshape(int width, int height)
}
m_scanline = new unsigned char[width * 4];
#endif // FLIP_FRAMEBUFFER_VERTICALLY
-
- GLbitfield clearMask = GL_COLOR_BUFFER_BIT;
- if (m_attributes.stencil)
- clearMask |= GL_STENCIL_BUFFER_BIT;
- if (m_attributes.depth)
- clearMask |= GL_DEPTH_BUFFER_BIT;
- glClear(clearMask);
}
#ifdef FLIP_FRAMEBUFFER_VERTICALLY
diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
index 8f88cb6..ea1c0b1 100644
--- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
@@ -10,9 +10,6 @@
* 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -32,9 +29,11 @@
#include "IDBCallbacks.h"
#include "IDBDatabaseError.h"
#include "IDBDatabaseProxy.h"
+#include "IDBIndexProxy.h"
#include "WebIDBCallbacks.h"
#include "WebIDBDatabase.h"
#include "WebIDBDatabaseError.h"
+#include "WebIDBIndex.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -56,12 +55,24 @@ void WebIDBCallbacksImpl::onError(const WebKit::WebIDBDatabaseError& error)
m_callbacks.clear();
}
+void WebIDBCallbacksImpl::onSuccess()
+{
+ m_callbacks->onSuccess();
+ m_callbacks.clear();
+}
+
void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBDatabase* webKitInstance)
{
m_callbacks->onSuccess(IDBDatabaseProxy::create(webKitInstance));
m_callbacks.clear();
}
+void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBIndex* webKitInstance)
+{
+ m_callbacks->onSuccess(IDBIndexProxy::create(webKitInstance));
+ m_callbacks.clear();
+}
+
void WebIDBCallbacksImpl::onSuccess(const WebKit::WebSerializedScriptValue& serializedScriptValue)
{
m_callbacks->onSuccess(serializedScriptValue);
@@ -71,4 +82,3 @@ void WebIDBCallbacksImpl::onSuccess(const WebKit::WebSerializedScriptValue& seri
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
-
diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.h b/WebKit/chromium/src/WebIDBCallbacksImpl.h
index 9b53117..8e5ada7 100644
--- a/WebKit/chromium/src/WebIDBCallbacksImpl.h
+++ b/WebKit/chromium/src/WebIDBCallbacksImpl.h
@@ -10,9 +10,6 @@
* 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -35,24 +32,20 @@
#if ENABLE(INDEXED_DATABASE)
-namespace WebKit {
-class WebIDBDatabase;
-class WebIDBDatabaseError;
-class WebSerializedScriptValue;
-}
-
namespace WebCore {
class IDBCallbacks;
class WebIDBCallbacksImpl : public WebKit::WebIDBCallbacks {
public:
- WebIDBCallbacksImpl(PassRefPtr<IDBCallbacks> callbacks);
+ WebIDBCallbacksImpl(PassRefPtr<IDBCallbacks>);
virtual ~WebIDBCallbacksImpl();
- virtual void onError(const WebKit::WebIDBDatabaseError& error);
- virtual void onSuccess(WebKit::WebIDBDatabase* webKitInstance);
- virtual void onSuccess(const WebKit::WebSerializedScriptValue& serializedScriptValue);
+ virtual void onError(const WebKit::WebIDBDatabaseError&);
+ virtual void onSuccess(); // For "null".
+ virtual void onSuccess(WebKit::WebIDBDatabase*);
+ virtual void onSuccess(WebKit::WebIDBIndex*);
+ virtual void onSuccess(const WebKit::WebSerializedScriptValue&);
private:
RefPtr<IDBCallbacks> m_callbacks;
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index e33edc2..3a00ccb 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -10,9 +10,6 @@
* 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -29,6 +26,7 @@
#include "config.h"
#include "WebIDBDatabaseImpl.h"
+#include "DOMStringList.h"
#include "IDBDatabase.h"
#if ENABLE(INDEXED_DATABASE)
@@ -38,6 +36,7 @@ using namespace WebCore;
namespace WebKit {
WebIDBDatabaseImpl::WebIDBDatabaseImpl(PassRefPtr<IDBDatabase> idbDatabase)
+ : m_idbDatabase(idbDatabase)
{
}
@@ -45,6 +44,26 @@ WebIDBDatabaseImpl::~WebIDBDatabaseImpl()
{
}
+WebString WebIDBDatabaseImpl::name()
+{
+ return m_idbDatabase->name();
+}
+
+WebString WebIDBDatabaseImpl::description()
+{
+ return m_idbDatabase->description();
+}
+
+WebString WebIDBDatabaseImpl::version()
+{
+ return m_idbDatabase->version();
+}
+
+WebDOMStringList WebIDBDatabaseImpl::objectStores()
+{
+ return m_idbDatabase->objectStores();
+}
+
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 758f84a..f99a759 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -10,9 +10,6 @@
* 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -44,7 +41,10 @@ public:
WebIDBDatabaseImpl(WTF::PassRefPtr<WebCore::IDBDatabase> idbDatabase);
virtual ~WebIDBDatabaseImpl();
- // FIXME: Implement.
+ virtual WebString name();
+ virtual WebString description();
+ virtual WebString version();
+ virtual WebDOMStringList objectStores();
private:
WTF::RefPtr<WebCore::IDBDatabase> m_idbDatabase;
diff --git a/WebKit/chromium/src/WebIDBIndexImpl.cpp b/WebKit/chromium/src/WebIDBIndexImpl.cpp
new file mode 100644
index 0000000..304217c
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBIndexImpl.cpp
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebIDBIndexImpl.h"
+
+#include "IDBIndex.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebIDBIndexImpl::WebIDBIndexImpl(PassRefPtr<IDBIndex> idbIndex)
+ : m_idbIndex(idbIndex)
+{
+}
+
+WebIDBIndexImpl::~WebIDBIndexImpl()
+{
+}
+
+WebString WebIDBIndexImpl::name() const
+{
+ return m_idbIndex->name();
+}
+
+WebString WebIDBIndexImpl::keyPath() const
+{
+ return m_idbIndex->keyPath();
+}
+
+bool WebIDBIndexImpl::unique() const
+{
+ return m_idbIndex->unique();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBIndexImpl.h b/WebKit/chromium/src/WebIDBIndexImpl.h
new file mode 100644
index 0000000..e1f0538
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBIndexImpl.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebIDBIndexImpl_h
+#define WebIDBIndexImpl_h
+
+#include "WebCommon.h"
+#include "WebIDBIndex.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore { class IDBIndex; }
+
+namespace WebKit {
+
+// See comment in WebIndexedDatabase for a high level overview these classes.
+class WebIDBIndexImpl : public WebIDBIndex {
+public:
+ WebIDBIndexImpl(WTF::PassRefPtr<WebCore::IDBIndex> idbIndex);
+ virtual ~WebIDBIndexImpl();
+
+ virtual WebString name() const;
+ virtual WebString keyPath() const;
+ virtual bool unique() const;
+
+private:
+ WTF::RefPtr<WebCore::IDBIndex> m_idbIndex;
+};
+
+} // namespace WebKit
+
+#endif // WebIDBIndexImpl_h
diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp b/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
index 99aad39..00122ad 100644
--- a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
@@ -57,9 +57,9 @@ WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl()
{
}
-void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, bool modifyDatabase, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, int& exceptionCode)
+void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, int& exceptionCode)
{
- m_indexedDatabase->open(name, description, modifyDatabase, IDBCallbacksProxy::create(callbacks), origin, 0, exceptionCode);
+ m_indexedDatabase->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0, exceptionCode);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.h b/WebKit/chromium/src/WebIndexedDatabaseImpl.h
index 57d20a6..072a92b 100644
--- a/WebKit/chromium/src/WebIndexedDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIndexedDatabaseImpl.h
@@ -41,7 +41,7 @@ public:
WebIndexedDatabaseImpl();
virtual ~WebIndexedDatabaseImpl();
- virtual void open(const WebString& name, const WebString& description, bool modifyDatabase, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, int& exceptionCode);
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, int& exceptionCode);
private:
WTF::RefPtr<WebCore::IndexedDatabase> m_indexedDatabase;
diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp
index 5200d17..5ae1557 100644
--- a/WebKit/chromium/src/WebNotification.cpp
+++ b/WebKit/chromium/src/WebNotification.cpp
@@ -94,6 +94,16 @@ WebString WebNotification::body() const
return m_private->contents().body();
}
+WebString WebNotification::dir() const
+{
+ return m_private->dir();
+}
+
+WebString WebNotification::replaceId() const
+{
+ return m_private->replaceId();
+}
+
void WebNotification::dispatchDisplayEvent()
{
RefPtr<Event> event = Event::create("display", false, true);
diff --git a/WebKit/chromium/src/WebPasswordFormUtils.cpp b/WebKit/chromium/src/WebPasswordFormUtils.cpp
index 766dc63..e5d5411 100644
--- a/WebKit/chromium/src/WebPasswordFormUtils.cpp
+++ b/WebKit/chromium/src/WebPasswordFormUtils.cpp
@@ -65,7 +65,7 @@ void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields)
int firstPasswordIndex = 0;
// First, find the password fields and activated submit button
- const Vector<HTMLFormControlElement*>& formElements = form->formElements;
+ const Vector<HTMLFormControlElement*>& formElements = form->associatedElements();
for (size_t i = 0; i < formElements.size(); i++) {
HTMLFormControlElement* formElement = formElements[i];
if (formElement->isActivatedSubmit())
diff --git a/WebKit/chromium/src/WebPluginListBuilderImpl.cpp b/WebKit/chromium/src/WebPluginListBuilderImpl.cpp
index 6926a2d..8f5a1f7 100644
--- a/WebKit/chromium/src/WebPluginListBuilderImpl.cpp
+++ b/WebKit/chromium/src/WebPluginListBuilderImpl.cpp
@@ -41,27 +41,28 @@ namespace WebKit {
void WebPluginListBuilderImpl::addPlugin(const WebString& name, const WebString& description, const WebString& fileName)
{
- PluginInfo* info = new PluginInfo();
- info->name = name;
- info->desc = description;
- info->file = fileName;
+ PluginInfo info;
+ info.name = name;
+ info.desc = description;
+ info.file = fileName;
m_results->append(info);
}
void WebPluginListBuilderImpl::addMediaTypeToLastPlugin(const WebString& name, const WebString& description)
{
- MimeClassInfo* info = new MimeClassInfo();
- info->type = name;
- info->desc = description;
- m_results->last()->mimes.append(info);
+ MimeClassInfo info;
+ info.type = name;
+ info.desc = description;
+ info.pluginIndex = m_results->size() - 1;
+ m_results->last().mimes.append(info);
}
void WebPluginListBuilderImpl::addFileExtensionToLastMediaType(const WebString& extension)
{
- MimeClassInfo* info = m_results->last()->mimes.last();
- if (!info->suffixes.isEmpty())
- info->suffixes.append(',');
- info->suffixes.append(extension);
+ MimeClassInfo& info = m_results->last().mimes.last();
+ if (!info.suffixes.isEmpty())
+ info.suffixes.append(',');
+ info.suffixes.append(extension);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebPluginListBuilderImpl.h b/WebKit/chromium/src/WebPluginListBuilderImpl.h
index 7a8a497..3d7977a 100644
--- a/WebKit/chromium/src/WebPluginListBuilderImpl.h
+++ b/WebKit/chromium/src/WebPluginListBuilderImpl.h
@@ -40,7 +40,7 @@ namespace WebKit {
class WebPluginListBuilderImpl : public WebPluginListBuilder {
public:
- WebPluginListBuilderImpl(Vector<WebCore::PluginInfo*>* results) : m_results(results) { }
+ WebPluginListBuilderImpl(Vector<WebCore::PluginInfo>* results) : m_results(results) { }
// WebPluginListBuilder methods:
virtual void addPlugin(const WebString& name, const WebString& description, const WebString& fileName);
@@ -48,7 +48,7 @@ public:
virtual void addFileExtensionToLastMediaType(const WebString& extension);
private:
- Vector<WebCore::PluginInfo*>* m_results;
+ Vector<WebCore::PluginInfo>* m_results;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 8eef6cc..601a497 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -77,7 +77,8 @@ bool IsHTTPFormSubmit(const HTMLFormElement* form)
HTMLFormControlElement* GetButtonToActivate(HTMLFormElement* form)
{
HTMLFormControlElement* firstSubmitButton = 0;
- for (Vector<HTMLFormControlElement*>::const_iterator i(form->formElements.begin()); i != form->formElements.end(); ++i) {
+ // FIXME: Consider refactoring this code so that we don't call form->associatedElements() twice.
+ for (Vector<HTMLFormControlElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) {
HTMLFormControlElement* formElement = *i;
if (formElement->isActivatedSubmit())
// There's a button that is already activated for submit, return 0.
@@ -154,7 +155,8 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
*encodingName = encoding.name();
HTMLInputElement* textElement = 0;
- for (Vector<HTMLFormControlElement*>::const_iterator i(form->formElements.begin()); i != form->formElements.end(); ++i) {
+ // FIXME: Consider refactoring this code so that we don't call form->associatedElements() twice.
+ for (Vector<HTMLFormControlElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) {
HTMLFormControlElement* formElement = *i;
if (formElement->disabled() || formElement->name().isNull())
continue;
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index 5f32346..946782b 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -274,4 +274,14 @@ void WebSettingsImpl::setEditingBehavior(EditingBehavior behavior)
m_settings->setEditingBehavior(static_cast<WebCore::EditingBehavior>(behavior));
}
+void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled)
+{
+ m_settings->setAcceleratedCompositingEnabled(enabled);
+}
+
+void WebSettingsImpl::setHTML5ParserEnabled(bool enabled)
+{
+ m_settings->setHTML5ParserEnabled(enabled);
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 0a90091..70bd792 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -86,6 +86,8 @@ public:
virtual void setExperimentalWebGLEnabled(bool);
virtual void setShowDebugBorders(bool);
virtual void setEditingBehavior(EditingBehavior);
+ virtual void setAcceleratedCompositingEnabled(bool);
+ virtual void setHTML5ParserEnabled(bool);
private:
WebCore::Settings* m_settings;
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 4e8b7c8..a38995e 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -73,7 +73,6 @@
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
#include "PlatformWheelEvent.h"
-#include "PluginInfoStore.h"
#include "PopupMenuChromium.h"
#include "PopupMenuClient.h"
#include "ProgressTracker.h"
@@ -258,6 +257,8 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
m_page->backForwardList()->setClient(&m_backForwardListClientImpl);
m_page->setGroupName(pageGroupName);
+
+ m_inspectorSettingsMap.set(new SettingsMap);
}
WebViewImpl::~WebViewImpl()
@@ -1462,9 +1463,12 @@ int WebViewImpl::setZoomLevel(bool textOnly, int zoomLevel)
maxTextSizeMultiplier),
minTextSizeMultiplier));
Frame* frame = mainFrameImpl()->frame();
- if (zoomFactor != frame->zoomFactor()) {
+ FrameView* view = frame->view();
+ if (!view)
+ return m_zoomLevel;
+ if (zoomFactor != view->zoomFactor()) {
m_zoomLevel = zoomLevel;
- frame->setZoomFactor(zoomFactor, textOnly ? ZoomTextOnly : ZoomPage);
+ view->setZoomFactor(zoomFactor, textOnly ? ZoomTextOnly : ZoomPage);
}
return m_zoomLevel;
}
@@ -1692,6 +1696,21 @@ void WebViewImpl::setInspectorSettings(const WebString& settings)
m_inspectorSettings = settings;
}
+bool WebViewImpl::inspectorSetting(const WebString& key, WebString* value) const
+{
+ if (!m_inspectorSettingsMap->contains(key))
+ return false;
+ *value = m_inspectorSettingsMap->get(key);
+ return true;
+}
+
+void WebViewImpl::setInspectorSetting(const WebString& key,
+ const WebString& value)
+{
+ m_inspectorSettingsMap->set(key, value);
+ client()->didUpdateInspectorSetting(key, value);
+}
+
WebDevToolsAgent* WebViewImpl::devToolsAgent()
{
return m_devToolsAgent.get();
@@ -2115,12 +2134,12 @@ void WebViewImpl::updateRootLayerContents(const WebRect& rect)
if (rootLayer) {
IntRect visibleRect = view->visibleContentRect(true);
- // Update the root layer's backing store to be the size of the dirty rect.
- // Unlike other layers the root layer doesn't have persistent storage for its
- // contents in system memory.
- rootLayer->setBackingStoreSize(IntSize(rect.width, rect.height));
- GraphicsContext* rootLayerContext = rootLayer->graphicsContext();
- skia::PlatformCanvas* platformCanvas = rootLayer->platformCanvas();
+ m_layerRenderer->setRootLayerCanvasSize(IntSize(rect.width, rect.height));
+ GraphicsContext* rootLayerContext = m_layerRenderer->rootLayerGraphicsContext();
+
+#if PLATFORM(SKIA)
+ PlatformContextSkia* skiaContext = rootLayerContext->platformContext();
+ skia::PlatformCanvas* platformCanvas = skiaContext->canvas();
platformCanvas->save();
@@ -2129,10 +2148,11 @@ void WebViewImpl::updateRootLayerContents(const WebRect& rect)
rootLayerContext->save();
- webframe->paintWithContext(*(rootLayer->graphicsContext()), rect);
+ webframe->paintWithContext(*rootLayerContext, rect);
rootLayerContext->restore();
platformCanvas->restore();
+#endif
}
}
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index d545a42..b2fc680 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -152,6 +152,9 @@ public:
virtual void inspectElementAt(const WebPoint& point);
virtual WebString inspectorSettings() const;
virtual void setInspectorSettings(const WebString& settings);
+ virtual bool inspectorSetting(const WebString& key, WebString* value) const;
+ virtual void setInspectorSetting(const WebString& key,
+ const WebString& value);
virtual WebDevToolsAgent* devToolsAgent();
virtual void setDevToolsAgent(WebDevToolsAgent*);
virtual WebAccessibilityObject accessibilityObject();
@@ -485,6 +488,9 @@ private:
// Inspector settings.
WebString m_inspectorSettings;
+ typedef HashMap<WebCore::String, WebCore::String> SettingsMap;
+ OwnPtr<SettingsMap> m_inspectorSettingsMap;
+
#if ENABLE(NOTIFICATIONS)
// The provider of desktop notifications;
NotificationPresenterImpl m_notificationPresenter;
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index 7c4d126..7e5b430 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -43,9 +43,9 @@ DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.D
Debug.clearBreakOnException();
Debug.clearBreakOnUncaughtException();
-DebuggerScript.getAfterCompileScript = function(execState, args)
+DebuggerScript.getAfterCompileScript = function(eventData)
{
- return DebuggerScript._formatScript(args.eventData.script_.script_);
+ return DebuggerScript._formatScript(eventData.script_.script_);
}
DebuggerScript.getScripts = function(contextData)
@@ -137,17 +137,17 @@ DebuggerScript.currentCallFrame = function(execState, args)
return topFrame;
}
-DebuggerScript.stepIntoStatement = function(execState, args)
+DebuggerScript.stepIntoStatement = function(execState)
{
execState.prepareStep(Debug.StepAction.StepIn, 1);
}
-DebuggerScript.stepOverStatement = function(execState, args)
+DebuggerScript.stepOverStatement = function(execState)
{
execState.prepareStep(Debug.StepAction.StepNext, 1);
}
-DebuggerScript.stepOutOfFunction = function(execState, args)
+DebuggerScript.stepOutOfFunction = function(execState)
{
execState.prepareStep(Debug.StepAction.StepOut, 1);
}
diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js
index 5c3e8bd..86f885a 100644
--- a/WebKit/chromium/src/js/InspectorControllerImpl.js
+++ b/WebKit/chromium/src/js/InspectorControllerImpl.js
@@ -56,6 +56,8 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("getEventListenersForNode");
this.installInspectorControllerDelegate_("getProfile");
this.installInspectorControllerDelegate_("getProfileHeaders");
+ this.installInspectorControllerDelegate_("removeProfile");
+ this.installInspectorControllerDelegate_("clearProfiles");
this.installInspectorControllerDelegate_("getResourceContent");
this.installInspectorControllerDelegate_("highlightDOMNode");
this.installInspectorControllerDelegate_("hideDOMNodeHighlight");
@@ -80,6 +82,8 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("getStyles");
this.installInspectorControllerDelegate_("getComputedStyle");
this.installInspectorControllerDelegate_("getInlineStyle");
+ this.installInspectorControllerDelegate_("getStyleSheet");
+ this.installInspectorControllerDelegate_("getRuleRangesForStyleSheetId");
this.installInspectorControllerDelegate_("applyStyleText");
this.installInspectorControllerDelegate_("setStyleText");
this.installInspectorControllerDelegate_("setStyleProperty");
@@ -94,7 +98,6 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("removeBreakpoint");
this.installInspectorControllerDelegate_("activateBreakpoints");
this.installInspectorControllerDelegate_("deactivateBreakpoints");
- this.installInspectorControllerDelegate_("pauseInDebugger");
this.installInspectorControllerDelegate_("resumeDebugger");
this.installInspectorControllerDelegate_("stepIntoStatementInDebugger");
this.installInspectorControllerDelegate_("stepOutOfFunctionInDebugger");
@@ -217,6 +220,13 @@ devtools.InspectorBackendImpl.prototype.setPauseOnExceptions = function(value)
return devtools.tools.getDebuggerAgent().setPauseOnExceptions(value);
};
+} else {
+
+devtools.InspectorBackendImpl.prototype.pauseInDebugger = function()
+{
+ RemoteDebuggerCommandExecutor.DebuggerPauseScript();
+};
+
}
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index 6b4b3e5..2cb4ab3 100755
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
@@ -237,6 +237,6 @@ select.status-bar-item {
-webkit-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.0);
}
-.timeline-category-tree-item input {
+.timeline-category-statusbar-item input {
vertical-align: middle;
}