summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-11 19:54:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-11 19:54:20 +0200
commit88a04ac016f57c2d78e714682445dff2e7db4ade (patch)
treea48ca81ee3b29953121308168db22532d5b57fe2 /Source/WebKit/chromium/src
parent284837daa07b29d6a63a748544a90b1f5842ac5c (diff)
downloadqtwebkit-88a04ac016f57c2d78e714682445dff2e7db4ade.tar.gz
Imported WebKit commit 42d95198c30c2d1a94a5081181aad0b2be7c316c (http://svn.webkit.org/repository/webkit/trunk@128206)
This includes the rewrite of the configure part of the build system which should fix the QtQuick2 detection and allow for further simplifications in the future
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r--Source/WebKit/chromium/src/AssertMatchingEnums.cpp1
-rw-r--r--Source/WebKit/chromium/src/PageWidgetDelegate.cpp1
-rw-r--r--Source/WebKit/chromium/src/ScrollbarGroup.cpp2
-rw-r--r--Source/WebKit/chromium/src/ScrollbarGroup.h2
-rw-r--r--Source/WebKit/chromium/src/SharedWorkerRepository.cpp50
-rw-r--r--Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp14
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp17
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebPopupMenuImpl.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp16
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h1
-rw-r--r--Source/WebKit/chromium/src/mac/WebSubstringUtil.mm6
13 files changed, 84 insertions, 30 deletions
diff --git a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
index cfaa26bab..c6bf971f1 100644
--- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -262,6 +262,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocumentRegion, DocumentRegionR
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUserInterfaceTooltip, UserInterfaceTooltipRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleToggleButton, ToggleButtonRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleCanvas, CanvasRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLegend, LegendRole);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Uncached, ApplicationCacheHost::UNCACHED);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Idle, ApplicationCacheHost::IDLE);
diff --git a/Source/WebKit/chromium/src/PageWidgetDelegate.cpp b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
index 340e6f1a9..6ad25d953 100644
--- a/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
+++ b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
@@ -154,6 +154,7 @@ bool PageWidgetDelegate::handleInputEvent(Page* page, PageWidgetEventHandler& ha
case WebInputEvent::GestureFlingCancel:
case WebInputEvent::GestureTap:
case WebInputEvent::GestureTapDown:
+ case WebInputEvent::GestureTapCancel:
case WebInputEvent::GestureDoubleTap:
case WebInputEvent::GestureTwoFingerTap:
case WebInputEvent::GestureLongPress:
diff --git a/Source/WebKit/chromium/src/ScrollbarGroup.cpp b/Source/WebKit/chromium/src/ScrollbarGroup.cpp
index 0e676cb5f..0923e8738 100644
--- a/Source/WebKit/chromium/src/ScrollbarGroup.cpp
+++ b/Source/WebKit/chromium/src/ScrollbarGroup.cpp
@@ -263,7 +263,7 @@ void ScrollbarGroup::scrollbarStyleChanged(int, bool forceUpdate)
m_verticalScrollbar->scrollbarStyleChanged();
}
-bool ScrollbarGroup::isOnActivePage() const
+bool ScrollbarGroup::scrollbarsCanBeActive() const
{
return true;
}
diff --git a/Source/WebKit/chromium/src/ScrollbarGroup.h b/Source/WebKit/chromium/src/ScrollbarGroup.h
index b2df772f4..78433f6b9 100644
--- a/Source/WebKit/chromium/src/ScrollbarGroup.h
+++ b/Source/WebKit/chromium/src/ScrollbarGroup.h
@@ -72,7 +72,7 @@ public:
virtual WebCore::IntPoint currentMousePosition() const OVERRIDE;
virtual bool shouldSuspendScrollAnimations() const OVERRIDE;
virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate) OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual WebCore::IntRect scrollableAreaBoundingBox() const OVERRIDE;
private:
diff --git a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
index d9188ddee..da019b42e 100644
--- a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
+++ b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
@@ -58,6 +58,30 @@
#include <public/WebString.h>
#include <public/WebURL.h>
+namespace WebKit {
+
+WebSharedWorkerRepository* s_sharedWorkerRepository = 0;
+
+void setSharedWorkerRepository(WebSharedWorkerRepository* repository)
+{
+ s_sharedWorkerRepository = repository;
+}
+
+static WebSharedWorkerRepository* sharedWorkerRepository()
+{
+ WebSharedWorkerRepository* repository;
+
+ repository = s_sharedWorkerRepository;
+ if (!repository) {
+ repository = webKitPlatformSupport()->sharedWorkerRepository();
+ setSharedWorkerRepository(repository);
+ }
+
+ return repository;
+}
+
+}
+
namespace WebCore {
class Document;
@@ -194,8 +218,9 @@ void SharedWorkerScriptLoader::connected()
bool SharedWorkerRepository::isAvailable()
{
- // Allow the WebKitPlatformSupport to determine if SharedWorkers are available.
- return WebKit::webKitPlatformSupport()->sharedWorkerRepository();
+ // Allow the WebKitPlatformSupport to determine if SharedWorkers
+ // are available.
+ return WebKit::sharedWorkerRepository();
}
static WebSharedWorkerRepository::DocumentID getId(void* document)
@@ -206,9 +231,11 @@ static WebSharedWorkerRepository::DocumentID getId(void* document)
void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr<MessagePortChannel> port, const KURL& url, const String& name, ExceptionCode& ec)
{
+ WebKit::WebSharedWorkerRepository* repository = WebKit::sharedWorkerRepository();
+
// This should not be callable unless there's a SharedWorkerRepository for
// this context (since isAvailable() should have returned null).
- ASSERT(WebKit::webKitPlatformSupport()->sharedWorkerRepository());
+ ASSERT(repository);
// No nested workers (for now) - connect() should only be called from document context.
ASSERT(worker->scriptExecutionContext()->isDocument());
@@ -223,8 +250,7 @@ void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr
return;
}
- WebKit::webKitPlatformSupport()->sharedWorkerRepository()->addSharedWorker(
- webWorker.get(), getId(document));
+ repository->addSharedWorker(webWorker.get(), getId(document));
// The loader object manages its own lifecycle (and the lifecycles of the two worker objects).
// It will free itself once loading is completed.
@@ -234,9 +260,10 @@ void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr
void SharedWorkerRepository::documentDetached(Document* document)
{
- WebSharedWorkerRepository* repo = WebKit::webKitPlatformSupport()->sharedWorkerRepository();
- if (repo)
- repo->documentDetached(getId(document));
+ WebKit::WebSharedWorkerRepository* repository = WebKit::sharedWorkerRepository();
+
+ if (repository)
+ repository->documentDetached(getId(document));
// Stop the creation of any pending SharedWorkers for this context.
// FIXME: Need a way to invoke this for WorkerContexts as well when we support for nested workers.
@@ -245,11 +272,10 @@ void SharedWorkerRepository::documentDetached(Document* document)
bool SharedWorkerRepository::hasSharedWorkers(Document* document)
{
- WebSharedWorkerRepository* repo = WebKit::webKitPlatformSupport()->sharedWorkerRepository();
- return repo && repo->hasSharedWorkers(getId(document));
-}
-
+ WebKit::WebSharedWorkerRepository* repository = WebKit::sharedWorkerRepository();
+ return repository && repository->hasSharedWorkers(getId(document));
+}
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
index 16222ac4f..87d7b2522 100644
--- a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
@@ -205,6 +205,7 @@ WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scrollBegin(WebPoint(gestureEvent.x, gestureEvent.y), WebInputHandlerClient::ScrollInputTypeGesture);
switch (scrollStatus) {
case WebInputHandlerClient::ScrollStatusStarted: {
+ m_inputHandlerClient->scrollEnd();
m_wheelFlingCurve = PlatformGestureCurveFactory::get()->createCurve(gestureEvent.data.flingStart.sourceDevice, FloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY));
TRACE_EVENT_ASYNC_BEGIN1("cc", "WebCompositorInputHandlerImpl::handleGestureFling::started", this, "curve", m_wheelFlingCurve->debugName());
m_wheelFlingParameters.delta = WebFloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY);
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 4395c6d70..1d187f09e 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -571,16 +571,18 @@ int WebFrame::instanceCount()
WebFrame* WebFrame::frameForEnteredContext()
{
- Frame* frame =
- ScriptController::retrieveFrameForEnteredContext();
- return WebFrameImpl::fromFrame(frame);
+ v8::Handle<v8::Context> context = v8::Context::GetEntered();
+ if (context.IsEmpty())
+ return 0;
+ return frameForContext(context);
}
WebFrame* WebFrame::frameForCurrentContext()
{
- Frame* frame =
- ScriptController::retrieveFrameForCurrentContext();
- return WebFrameImpl::fromFrame(frame);
+ v8::Handle<v8::Context> context = v8::Context::GetCurrent();
+ if (context.IsEmpty())
+ return 0;
+ return frameForContext(context);
}
#if WEBKIT_USING_V8
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index e570dca5a..e75c73947 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -92,9 +92,11 @@ WebMediaPlayer* WebMediaPlayerClientImpl::mediaPlayer() const
WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl()
{
#if USE(ACCELERATED_COMPOSITING)
- MutexLocker locker(m_compositingMutex);
if (m_videoFrameProviderClient)
m_videoFrameProviderClient->stopUsingProvider();
+ // No need for a lock here, as getCurrentFrame/putCurrentFrame can't be
+ // called now that the client is no longer using this provider. Also, load()
+ // and this destructor are called from the same thread.
if (m_webMediaPlayer)
m_webMediaPlayer->setStreamTextureClient(0);
#endif
@@ -312,8 +314,8 @@ void WebMediaPlayerClientImpl::load(const String& url)
{
m_url = url;
+ MutexLocker locker(m_webMediaPlayerMutex);
if (m_preload == MediaPlayer::None) {
- MutexLocker locker(m_compositingMutex);
#if ENABLE(WEB_AUDIO)
m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
#endif
@@ -325,7 +327,6 @@ void WebMediaPlayerClientImpl::load(const String& url)
void WebMediaPlayerClientImpl::loadInternal()
{
- MutexLocker locker(m_compositingMutex);
#if ENABLE(WEB_AUDIO)
m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
#endif
@@ -766,7 +767,7 @@ bool WebMediaPlayerClientImpl::acceleratedRenderingInUse()
void WebMediaPlayerClientImpl::setVideoFrameProviderClient(WebVideoFrameProvider::Client* client)
{
- MutexLocker locker(m_compositingMutex);
+ MutexLocker locker(m_webMediaPlayerMutex);
if (m_videoFrameProviderClient)
m_videoFrameProviderClient->stopUsingProvider();
m_videoFrameProviderClient = client;
@@ -776,8 +777,10 @@ void WebMediaPlayerClientImpl::setVideoFrameProviderClient(WebVideoFrameProvider
WebVideoFrame* WebMediaPlayerClientImpl::getCurrentFrame()
{
- MutexLocker locker(m_compositingMutex);
+ // This function is called only by the client.
+ MutexLocker locker(m_webMediaPlayerMutex);
ASSERT(!m_currentVideoFrame);
+ ASSERT(m_videoFrameProviderClient);
if (m_webMediaPlayer)
m_currentVideoFrame = m_webMediaPlayer->getCurrentFrame();
return m_currentVideoFrame;
@@ -785,8 +788,10 @@ WebVideoFrame* WebMediaPlayerClientImpl::getCurrentFrame()
void WebMediaPlayerClientImpl::putCurrentFrame(WebVideoFrame* videoFrame)
{
- MutexLocker locker(m_compositingMutex);
+ // This function is called only by the client.
+ MutexLocker locker(m_webMediaPlayerMutex);
ASSERT(videoFrame == m_currentVideoFrame);
+ ASSERT(m_videoFrameProviderClient);
if (!videoFrame)
return;
if (m_webMediaPlayer)
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
index dd170e57c..73eb78fa8 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
@@ -197,7 +197,7 @@ private:
bool acceleratedRenderingInUse();
#endif
- Mutex m_compositingMutex; // Guards m_currentVideoFrame and m_videoFrameProviderClient.
+ Mutex m_webMediaPlayerMutex; // Guards the m_webMediaPlayer
WebCore::MediaPlayer* m_mediaPlayer;
OwnPtr<WebMediaPlayer> m_webMediaPlayer;
WebVideoFrame* m_currentVideoFrame;
diff --git a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
index 194dee550..58a2855cd 100644
--- a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -288,6 +288,7 @@ bool WebPopupMenuImpl::handleInputEvent(const WebInputEvent& inputEvent)
case WebInputEvent::Undefined:
case WebInputEvent::MouseEnter:
case WebInputEvent::ContextMenu:
+ case WebInputEvent::GestureTapCancel:
return false;
}
return false;
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index be474d8fa..238b2f920 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -771,6 +771,10 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
}
+ case WebInputEvent::GestureTapCancel:
+ // FIXME: Update WebCore to handle this event after chromium has been updated to send it
+ // http://wkb.ug/96060
+ return false;
default:
ASSERT_NOT_REACHED();
}
@@ -2924,6 +2928,18 @@ void WebViewImpl::resetSavedScrollAndScaleState()
m_savedScrollOffset = IntSize();
}
+void WebViewImpl::resetScrollAndScaleState()
+{
+ page()->setPageScaleFactor(0, IntPoint());
+ m_pageScaleFactorIsSet = false;
+
+ // Clobber saved scales and scroll offsets.
+ if (FrameView* view = page()->mainFrame()->document()->view())
+ view->cacheCurrentScrollPosition();
+ resetSavedScrollAndScaleState();
+ page()->mainFrame()->loader()->history()->saveDocumentAndScrollState();
+}
+
WebSize WebViewImpl::fixedLayoutSize() const
{
if (!page())
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index ce5657a2b..11a05d0de 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -227,6 +227,7 @@ public:
virtual float maximumPageScaleFactor() const;
virtual void saveScrollAndScaleState();
virtual void restoreScrollAndScaleState();
+ virtual void resetScrollAndScaleState();
virtual void setIgnoreViewportTagMaximumScale(bool);
virtual float deviceScaleFactor() const;
diff --git a/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm b/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm
index dd9951f83..682da0ef3 100644
--- a/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm
+++ b/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm
@@ -30,9 +30,10 @@
*/
#include "config.h"
-#include "WebFrameImpl.h"
#include "WebSubstringUtil.h"
+#import <Cocoa/Cocoa.h>
+
#include "ColorMac.h"
#include "Document.h"
#include "Element.h"
@@ -45,10 +46,9 @@
#include "RenderObject.h"
#include "RenderStyle.h"
#include "TextIterator.h"
+#include "WebFrameImpl.h"
#include "platform/WebRect.h"
-#import <Cocoa/Cocoa.h>
-
using namespace WebCore;
namespace WebKit {