summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r--Source/WebKit/chromium/src/AssertMatchingEnums.cpp3
-rw-r--r--Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/IDBCallbacksProxy.cpp4
-rw-r--r--Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp5
-rw-r--r--Source/WebKit/chromium/src/IDBCursorBackendProxy.h1
-rwxr-xr-xSource/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp8
-rw-r--r--Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h1
-rw-r--r--Source/WebKit/chromium/src/LocalFileSystemChromium.cpp21
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/WebIDBCursorImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebIDBCursorImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp1
-rwxr-xr-xSource/WebKit/chromium/src/WebIDBFactoryImpl.cpp7
-rw-r--r--Source/WebKit/chromium/src/WebIDBFactoryImpl.h1
-rwxr-xr-xSource/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebInputEvent.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebLayerTreeView.cpp3
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebPagePopupImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebRuntimeFeatures.cpp94
-rw-r--r--Source/WebKit/chromium/src/WebViewBenchmarkSupportImpl.cpp14
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp56
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h13
25 files changed, 209 insertions, 47 deletions
diff --git a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
index 789d1b623..5f250351a 100644
--- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -537,6 +537,9 @@ COMPILE_ASSERT_MATCHING_ENUM(WebPageVisibilityStatePreview, PageVisibilityStateP
#if ENABLE(MEDIA_STREAM)
COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::TypeAudio, MediaStreamSource::TypeAudio);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::TypeVideo, MediaStreamSource::TypeVideo);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::ReadyStateLive, MediaStreamSource::ReadyStateLive);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::ReadyStateMuted, MediaStreamSource::ReadyStateMuted);
+COMPILE_ASSERT_MATCHING_ENUM(WebMediaStreamSource::ReadyStateEnded, MediaStreamSource::ReadyStateEnded);
COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeAll, IceOptions::ALL);
COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeNoRelay, IceOptions::NO_RELAY);
diff --git a/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp b/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp
index 63e16726e..bc4cfb834 100644
--- a/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp
@@ -143,6 +143,8 @@ bool ContextFeaturesClientImpl::askIfIsEnabled(Document* document, ContextFeatur
case ContextFeatures::ShadowDOM:
case ContextFeatures::StyleScoped:
return m_client->allowWebComponents(WebDocument(document), defaultValue);
+ case ContextFeatures::HTMLNotifications:
+ return m_client->allowHTMLNotifications(WebDocument(document));
default:
return defaultValue;
}
diff --git a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
index a544189b6..7df84d2ff 100644
--- a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -31,8 +31,12 @@
#if ENABLE(INDEXED_DATABASE)
+#include "IDBCursorBackendInterface.h"
+#include "IDBDatabaseBackendInterface.h"
#include "IDBDatabaseBackendProxy.h"
#include "IDBDatabaseError.h"
+#include "IDBObjectStoreBackendInterface.h"
+#include "IDBTransactionBackendInterface.h"
#include "WebIDBCallbacks.h"
#include "WebIDBCursorImpl.h"
#include "WebIDBDatabaseImpl.h"
diff --git a/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp b/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp
index ca390ba90..277a665cf 100644
--- a/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBCursorBackendProxy.cpp
@@ -69,11 +69,6 @@ PassRefPtr<SerializedScriptValue> IDBCursorBackendProxy::value() const
return m_idbCursor->value();
}
-void IDBCursorBackendProxy::update(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
-{
- m_idbCursor->update(value, new WebIDBCallbacksImpl(callbacks), ec);
-}
-
void IDBCursorBackendProxy::advance(unsigned long count, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
{
m_idbCursor->advance(count, new WebIDBCallbacksImpl(callbacks), ec);
diff --git a/Source/WebKit/chromium/src/IDBCursorBackendProxy.h b/Source/WebKit/chromium/src/IDBCursorBackendProxy.h
index 9e4b57008..d742f68e5 100644
--- a/Source/WebKit/chromium/src/IDBCursorBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBCursorBackendProxy.h
@@ -45,7 +45,6 @@ public:
virtual PassRefPtr<WebCore::IDBKey> key() const;
virtual PassRefPtr<WebCore::IDBKey> primaryKey() const;
virtual PassRefPtr<WebCore::SerializedScriptValue> value() const;
- virtual void update(PassRefPtr<WebCore::SerializedScriptValue>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
virtual void advance(unsigned long, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
virtual void continueFunction(PassRefPtr<WebCore::IDBKey>, PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
virtual void deleteFunction(PassRefPtr<WebCore::IDBCallbacks>, WebCore::ExceptionCode&);
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
index 826407330..4d1c91d07 100755
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.cpp
@@ -67,14 +67,6 @@ void IDBObjectStoreBackendProxy::get(PassRefPtr<IDBKeyRange> keyRange, PassRefPt
m_webIDBObjectStore->get(keyRange, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBObjectStoreBackendProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
-{
- // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
- // all implementations of IDB interfaces are proxy objects.
- IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- m_webIDBObjectStore->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,
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
index c64028cff..0235077fa 100644
--- a/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
+++ b/Source/WebKit/chromium/src/IDBObjectStoreBackendProxy.h
@@ -44,7 +44,6 @@ public:
virtual ~IDBObjectStoreBackendProxy();
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/LocalFileSystemChromium.cpp b/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
index 6fded29ff..d22412ac8 100644
--- a/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
+++ b/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
@@ -183,6 +183,11 @@ static void openFileSystemNotAllowed(ScriptExecutionContext*, PassOwnPtr<AsyncFi
callbacks->didFail(WebKit::WebFileErrorAbort);
}
+static void deleteFileSystemNotAllowed(ScriptExecutionContext*, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ callbacks->didFail(WebKit::WebFileErrorAbort);
+}
+
static void openFileSystemHelper(ScriptExecutionContext* context, FileSystemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, FileSystemSynchronousType synchronousType, long long size, CreationFlag create)
{
bool allowed = true;
@@ -226,6 +231,22 @@ void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, FileSys
openFileSystemHelper(context, type, callbacks, synchronousType, size, CreateIfNotPresent);
}
+void LocalFileSystem::deleteFileSystem(ScriptExecutionContext* context, FileSystemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ ASSERT(context);
+ ASSERT(context->isDocument());
+
+ Document* document = static_cast<Document*>(context);
+ WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
+ WebKit::WebViewImpl* webView = webFrame->viewImpl();
+ if (webView->permissionClient() && !webView->permissionClient()->allowFileSystem(webFrame)) {
+ context->postTask(createCallbackTask(&deleteFileSystemNotAllowed, callbacks));
+ return;
+ }
+
+ webFrame->client()->deleteFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), new WebFileSystemCallbacksImpl(callbacks));
+}
+
} // namespace WebCore
#endif // ENABLE(FILE_SYSTEM)
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 0cfbac209..f821562f6 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -1465,10 +1465,10 @@ VisiblePosition WebFrameImpl::visiblePositionForWindowPoint(const WebPoint& poin
HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move;
hitType |= HitTestRequest::ReadOnly;
hitType |= HitTestRequest::Active;
+ hitType |= HitTestRequest::IgnoreClipping;
HitTestRequest request(hitType);
FrameView* view = frame()->view();
- HitTestResult result(view->windowToContents(
- view->convertFromContainingWindow(IntPoint(point.x, point.y))));
+ HitTestResult result(view->windowToContents(IntPoint(point.x, point.y)));
frame()->document()->renderView()->layer()->hitTest(request, result);
diff --git a/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp b/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp
index e9c0e04af..0d65a87be 100644
--- a/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBCursorImpl.cpp
@@ -62,11 +62,6 @@ WebSerializedScriptValue WebIDBCursorImpl::value() const
return m_idbCursorBackend->value();
}
-void WebIDBCursorImpl::update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
-{
- m_idbCursorBackend->update(value, IDBCallbacksProxy::create(adoptPtr(callbacks)), ec);
-}
-
void WebIDBCursorImpl::advance(unsigned long count, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
m_idbCursorBackend->advance(count, IDBCallbacksProxy::create(adoptPtr(callbacks)), ec);
diff --git a/Source/WebKit/chromium/src/WebIDBCursorImpl.h b/Source/WebKit/chromium/src/WebIDBCursorImpl.h
index f0d387b62..45a229b38 100644
--- a/Source/WebKit/chromium/src/WebIDBCursorImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBCursorImpl.h
@@ -47,7 +47,6 @@ public:
virtual WebIDBKey key() const;
virtual WebIDBKey primaryKey() const;
virtual WebSerializedScriptValue value() const;
- virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&);
virtual void advance(unsigned long, WebIDBCallbacks*, WebExceptionCode&);
virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&);
virtual void deleteFunction(WebIDBCallbacks*, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index 18573cacf..bc6d09fa1 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -33,6 +33,7 @@
#include "IDBDatabaseBackendInterface.h"
#include "IDBDatabaseCallbacksProxy.h"
#include "IDBMetadata.h"
+#include "IDBObjectStoreBackendInterface.h"
#include "IDBTransactionBackendInterface.h"
#include "WebIDBCallbacks.h"
#include "WebIDBDatabaseCallbacks.h"
diff --git a/Source/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/Source/WebKit/chromium/src/WebIDBFactoryImpl.cpp
index d875e11bc..d14ac71e1 100755
--- a/Source/WebKit/chromium/src/WebIDBFactoryImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBFactoryImpl.cpp
@@ -69,6 +69,13 @@ void WebIDBFactoryImpl::open(const WebString& name, WebIDBCallbacks* callbacks,
m_idbFactoryBackend->open(name, IDBCallbacksProxy::create(adoptPtr(callbacks)).get(), origin, 0, dataDir);
}
+void WebIDBFactoryImpl::open(const WebString& name, long long version, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir)
+{
+ // FIXME: Pass version along when WebCore::IDBFactoryBackendInterface
+ // has an open method that accepts it.
+ m_idbFactoryBackend->open(name, IDBCallbacksProxy::create(adoptPtr(callbacks)).get(), origin, 0, dataDir);
+}
+
void WebIDBFactoryImpl::deleteDatabase(const WebString& name, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir)
{
m_idbFactoryBackend->deleteDatabase(name, IDBCallbacksProxy::create(adoptPtr(callbacks)), origin, 0, dataDir);
diff --git a/Source/WebKit/chromium/src/WebIDBFactoryImpl.h b/Source/WebKit/chromium/src/WebIDBFactoryImpl.h
index b3e474df9..fa438d764 100644
--- a/Source/WebKit/chromium/src/WebIDBFactoryImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBFactoryImpl.h
@@ -46,6 +46,7 @@ public:
virtual void getDatabaseNames(WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir);
virtual void open(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir);
+ virtual void open(const WebString& name, long long version, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir);
virtual void deleteDatabase(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir);
private:
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
index 53d140f42..22a066807 100755
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -58,11 +58,6 @@ void WebIDBObjectStoreImpl::get(const WebIDBKeyRange& keyRange, WebIDBCallbacks*
m_objectStore->get(keyRange, IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, PutMode putMode, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
-{
- m_objectStore->put(value, key, static_cast<IDBObjectStoreBackendInterface::PutMode>(putMode), IDBCallbacksProxy::create(adoptPtr(callbacks)), transaction.getIDBTransactionBackendInterface(), ec);
-}
-
void WebIDBObjectStoreImpl::putWithIndexKeys(const WebSerializedScriptValue& value, const WebIDBKey& key, PutMode putMode, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, const WebVector<WebString>& webIndexNames, const WebVector<WebIndexKeys>& webIndexKeys, WebExceptionCode& ec)
{
ASSERT(webIndexNames.size() == webIndexKeys.size());
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
index e6dc88f54..934cffa99 100644
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -46,7 +46,6 @@ public:
~WebIDBObjectStoreImpl();
void get(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
- void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void putWithIndexKeys(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, const WebVector<WebString>& indexNames, const WebVector<WebIndexKeys>&, WebExceptionCode&);
void deleteFunction(const WebIDBKeyRange&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
index 94610eba9..5cbbee663 100644
--- a/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBTransactionImpl.cpp
@@ -28,6 +28,7 @@
#if ENABLE(INDEXED_DATABASE)
+#include "IDBObjectStoreBackendInterface.h"
#include "IDBTransaction.h"
#include "IDBTransactionCallbacksProxy.h"
#include "WebIDBObjectStoreImpl.h"
diff --git a/Source/WebKit/chromium/src/WebInputEvent.cpp b/Source/WebKit/chromium/src/WebInputEvent.cpp
index c0690f8d7..66a0480b4 100644
--- a/Source/WebKit/chromium/src/WebInputEvent.cpp
+++ b/Source/WebKit/chromium/src/WebInputEvent.cpp
@@ -60,7 +60,7 @@ struct SameSizeAsWebMouseWheelEvent : public SameSizeAsWebMouseEvent {
};
struct SameSizeAsWebGestureEvent : public SameSizeAsWebInputEvent {
- int gestureData[6];
+ int gestureData[10];
};
struct SameSizeAsWebTouchEvent : public SameSizeAsWebInputEvent {
diff --git a/Source/WebKit/chromium/src/WebLayerTreeView.cpp b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
index 34eb952fd..b87df0f1b 100644
--- a/Source/WebKit/chromium/src/WebLayerTreeView.cpp
+++ b/Source/WebKit/chromium/src/WebLayerTreeView.cpp
@@ -52,6 +52,7 @@ WebLayerTreeView::Settings::operator CCLayerTreeSettings() const
settings.refreshRate = refreshRate;
settings.defaultTileSize = defaultTileSize;
settings.maxUntiledLayerSize = maxUntiledLayerSize;
+ settings.acceleratePainting = acceleratePainting;
// FIXME: showFPSCounter / showPlatformLayerTree / maxPartialTextureUpdates aren't supported currently.
return settings;
@@ -183,6 +184,8 @@ void WebLayerTreeView::renderingStats(WebRenderingStats& stats) const
stats.numAnimationFrames = ccStats.numAnimationFrames;
stats.numFramesSentToScreen = ccStats.numFramesSentToScreen;
stats.droppedFrameCount = ccStats.droppedFrameCount;
+ stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds;
+ stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds;
}
void WebLayerTreeView::loseCompositorContext(int numTimes)
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
index 6d59cc19c..fd5d2f2ad 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp
@@ -190,6 +190,8 @@ bool WebPagePopupImpl::initPage()
m_page = adoptPtr(new Page(pageClients));
m_page->settings()->setScriptEnabled(true);
m_page->settings()->setAllowScriptsToCloseWindows(true);
+ m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor());
+ m_page->settings()->setDeviceSupportsTouch(m_webView->page()->settings()->deviceSupportsTouch());
static ContextFeaturesClient* pagePopupFeaturesClient = new PagePopupFeaturesClient();
provideContextFeaturesTo(m_page.get(), pagePopupFeaturesClient);
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.h b/Source/WebKit/chromium/src/WebPagePopupImpl.h
index 2e1c8c3f3..2552bacf1 100644
--- a/Source/WebKit/chromium/src/WebPagePopupImpl.h
+++ b/Source/WebKit/chromium/src/WebPagePopupImpl.h
@@ -63,6 +63,7 @@ public:
bool handleKeyEvent(const WebCore::PlatformKeyboardEvent&);
void closePopup();
WebWidgetClient* widgetClient() const { return m_widgetClient; }
+ bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupClient == other->m_popupClient; }
private:
// WebWidget functions
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 491a30311..ec08f0a0e 100644
--- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -462,7 +462,7 @@ bool WebRuntimeFeatures::isVideoTrackEnabled()
void WebRuntimeFeatures::enableGamepad(bool enable)
{
#if ENABLE(GAMEPAD)
- RuntimeEnabledFeatures::setWebkitGamepadsEnabled(enable);
+ RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled(enable);
#else
UNUSED_PARAM(enable);
#endif
@@ -471,7 +471,7 @@ void WebRuntimeFeatures::enableGamepad(bool enable)
bool WebRuntimeFeatures::isGamepadEnabled()
{
#if ENABLE(GAMEPAD)
- return RuntimeEnabledFeatures::webkitGamepadsEnabled();
+ return RuntimeEnabledFeatures::webkitGetGamepadsEnabled();
#else
return false;
#endif
@@ -531,6 +531,96 @@ bool WebRuntimeFeatures::isInputTypeDateEnabled()
#endif
}
+void WebRuntimeFeatures::enableInputTypeDateTime(bool enable)
+{
+#if ENABLE(INPUT_TYPE_DATETIME)
+ RuntimeEnabledFeatures::setInputTypeDateTimeEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeDateTimeEnabled()
+{
+#if ENABLE(INPUT_TYPE_DATETIME)
+ return RuntimeEnabledFeatures::inputTypeDateTimeEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeDateTimeLocal(bool enable)
+{
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+ RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeDateTimeLocalEnabled()
+{
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+ return RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeMonth(bool enable)
+{
+#if ENABLE(INPUT_TYPE_MONTH)
+ RuntimeEnabledFeatures::setInputTypeMonthEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeMonthEnabled()
+{
+#if ENABLE(INPUT_TYPE_MONTH)
+ return RuntimeEnabledFeatures::inputTypeMonthEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeTime(bool enable)
+{
+#if ENABLE(INPUT_TYPE_TIME)
+ RuntimeEnabledFeatures::setInputTypeTimeEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeTimeEnabled()
+{
+#if ENABLE(INPUT_TYPE_TIME)
+ return RuntimeEnabledFeatures::inputTypeTimeEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeWeek(bool enable)
+{
+#if ENABLE(INPUT_TYPE_WEEK)
+ RuntimeEnabledFeatures::setInputTypeWeekEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeWeekEnabled()
+{
+#if ENABLE(INPUT_TYPE_WEEK)
+ return RuntimeEnabledFeatures::inputTypeWeekEnabled();
+#else
+ return false;
+#endif
+}
+
void WebRuntimeFeatures::enableDialogElement(bool enable)
{
#if ENABLE(DIALOG_ELEMENT)
diff --git a/Source/WebKit/chromium/src/WebViewBenchmarkSupportImpl.cpp b/Source/WebKit/chromium/src/WebViewBenchmarkSupportImpl.cpp
index 2b11f6eb6..9764af138 100644
--- a/Source/WebKit/chromium/src/WebViewBenchmarkSupportImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewBenchmarkSupportImpl.cpp
@@ -47,12 +47,11 @@ namespace WebKit {
void WebViewBenchmarkSupportImpl::paintLayer(PaintClient* paintClient, GraphicsLayer& layer, const IntRect& clip)
{
WebSize canvasSize(clip.width(), clip.height());
- OwnPtr<WebCanvas> canvas = adoptPtr(paintClient->createCanvas(canvasSize));
- GraphicsContextBuilder builder(canvas.get());
+ WebCanvas* canvas = paintClient->willPaint(canvasSize);
+ GraphicsContextBuilder builder(canvas);
- paintClient->willPaint(*canvas.get());
layer.paintGraphicsLayerContents(builder.context(), clip);
- paintClient->didPaint(*canvas.get());
+ paintClient->didPaint(canvas);
}
void WebViewBenchmarkSupportImpl::acceleratedPaintUnclipped(PaintClient* paintClient, GraphicsLayer& layer)
@@ -84,10 +83,9 @@ void WebViewBenchmarkSupportImpl::softwarePaint(PaintClient* paintClient, PaintM
}
WebSize canvasSize(paintSize.width, paintSize.height);
- OwnPtr<WebCanvas> canvas = adoptPtr(paintClient->createCanvas(canvasSize));
- paintClient->willPaint(*canvas.get());
- m_webViewImpl->paint(canvas.get(), paintSize);
- paintClient->didPaint(*canvas.get());
+ WebCanvas* canvas = paintClient->willPaint(canvasSize);
+ m_webViewImpl->paint(canvas, paintSize);
+ paintClient->didPaint(canvas);
}
void WebViewBenchmarkSupportImpl::paint(PaintClient* paintClient, PaintMode paintMode)
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 6a253f8e3..7c6da60d9 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -197,6 +197,8 @@ static const float doubleTapZoomContentDefaultMargin = 5;
static const float doubleTapZoomContentMinimumMargin = 2;
static const double doubleTabZoomAnimationDurationInSeconds = 0.25;
+// Constants for zooming in on a focused text field.
+static const double scrollAndScaleAnimationDurationInSeconds = 0.2;
namespace WebKit {
@@ -392,6 +394,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_maximumPageScaleFactor(maxPageScaleFactor)
, m_ignoreViewportTagMaximumScale(false)
, m_pageScaleFactorIsSet(false)
+ , m_savedPageScaleFactor(0)
, m_contextMenuAllowed(false)
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
@@ -522,14 +525,23 @@ void WebViewImpl::handleMouseLeave(Frame& mainFrame, const WebMouseEvent& event)
void WebViewImpl::handleMouseDown(Frame& mainFrame, const WebMouseEvent& event)
{
- // If there is a select popup open, close it as the user is clicking on
- // the page (outside of the popup). We also save it so we can prevent a
- // click on the select element from immediately reopening the popup.
+ // If there is a popup open, close it as the user is clicking on the page (outside of the
+ // popup). We also save it so we can prevent a click on an element from immediately
+ // reopening the same popup.
RefPtr<WebCore::PopupContainer> selectPopup;
+#if ENABLE(PAGE_POPUP)
+ RefPtr<WebPagePopupImpl> pagePopup;
+#endif
if (event.button == WebMouseEvent::ButtonLeft) {
selectPopup = m_selectPopup;
- hideSelectPopup();
+#if ENABLE(PAGE_POPUP)
+ pagePopup = m_pagePopup;
+#endif
+ hidePopups();
ASSERT(!m_selectPopup);
+#if ENABLE(PAGE_POPUP)
+ ASSERT(!m_pagePopup);
+#endif
}
m_lastMouseDownPoint = WebPoint(event.x, event.y);
@@ -555,6 +567,14 @@ void WebViewImpl::handleMouseDown(Frame& mainFrame, const WebMouseEvent& event)
hideSelectPopup();
}
+#if ENABLE(PAGE_POPUP)
+ if (m_pagePopup && pagePopup && m_pagePopup->hasSamePopupClient(pagePopup.get())) {
+ // That click triggered a page popup that is the same as the one we just closed.
+ // It needs to be closed.
+ closePagePopup(m_pagePopup.get());
+ }
+#endif
+
// Dispatch the contextmenu event regardless of if the click was swallowed.
// On Windows, we handle it on mouse up, not down.
#if OS(DARWIN)
@@ -2713,6 +2733,33 @@ float WebViewImpl::maximumPageScaleFactor() const
return m_maximumPageScaleFactor;
}
+void WebViewImpl::saveScrollAndScaleState()
+{
+ m_savedPageScaleFactor = pageScaleFactor();
+ m_savedScrollOffset = mainFrame()->scrollOffset();
+}
+
+void WebViewImpl::restoreScrollAndScaleState()
+{
+ if (!m_savedPageScaleFactor)
+ return;
+
+#if ENABLE(GESTURE_EVENTS)
+ startPageScaleAnimation(IntPoint(m_savedScrollOffset), false, m_savedPageScaleFactor, scrollAndScaleAnimationDurationInSeconds);
+#else
+ setPageScaleFactor(m_savedPageScaleFactor, WebPoint());
+ mainFrame()->setScrollOffset(m_savedScrollOffset);
+#endif
+
+ resetSavedScrollAndScaleState();
+}
+
+void WebViewImpl::resetSavedScrollAndScaleState()
+{
+ m_savedPageScaleFactor = 0;
+ m_savedScrollOffset = IntSize();
+}
+
WebSize WebViewImpl::fixedLayoutSize() const
{
if (!page())
@@ -3246,6 +3293,7 @@ void WebViewImpl::didCommitLoad(bool* isNewNavigation, bool isNavigationWithinPa
m_pageScaleFactorIsSet = false;
m_gestureAnimation.clear();
+ resetSavedScrollAndScaleState();
}
void WebViewImpl::layoutUpdated(WebFrameImpl* webframe)
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index 1155969fd..639d5e61a 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -174,6 +174,7 @@ public:
virtual void didChangeWindowResizerRect();
virtual void instrumentBeginFrame();
virtual void instrumentCancelFrame();
+ virtual void renderingStats(WebRenderingStats&) const;
// WebView methods:
virtual void initializeMainFrame(WebFrameClient*);
@@ -220,6 +221,8 @@ public:
virtual void setPageScaleFactorLimits(float minPageScale, float maxPageScale);
virtual float minimumPageScaleFactor() const;
virtual float maximumPageScaleFactor() const;
+ virtual void saveScrollAndScaleState();
+ virtual void restoreScrollAndScaleState();
virtual void setIgnoreViewportTagMaximumScale(bool);
virtual float deviceScaleFactor() const;
@@ -296,7 +299,6 @@ public:
virtual void updateBatteryStatus(const WebBatteryStatus&);
#endif
virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&);
- virtual void renderingStats(WebRenderingStats&) const;
virtual WebViewBenchmarkSupport* benchmarkSupport();
// WebLayerTreeViewClient
@@ -579,6 +581,8 @@ private:
float clampPageScaleFactorToLimits(float scale);
WebPoint clampOffsetAtScale(const WebPoint& offset, float scale);
+ void resetSavedScrollAndScaleState();
+
friend class WebView; // So WebView::Create can call our constructor
friend class WTF::RefCounted<WebViewImpl>;
@@ -707,15 +711,18 @@ private:
double m_maximumZoomLevel;
+ // State related to the page scale
float m_pageDefinedMinimumPageScaleFactor;
float m_pageDefinedMaximumPageScaleFactor;
float m_minimumPageScaleFactor;
float m_maximumPageScaleFactor;
-
bool m_ignoreViewportTagMaximumScale;
-
bool m_pageScaleFactorIsSet;
+ // Saved page scale state.
+ float m_savedPageScaleFactor; // 0 means that no page scale factor is saved.
+ WebCore::IntSize m_savedScrollOffset;
+
bool m_contextMenuAllowed;
bool m_doingDragAndDrop;