From 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 9 Feb 2012 14:16:12 +0100 Subject: Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223) --- Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp | 6 +++--- Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h | 1 - Source/WebKit2/WebProcess/Plugins/PluginView.cpp | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'Source/WebKit2/WebProcess/Plugins') diff --git a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp index 13f97d96f..904a83dcd 100644 --- a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp +++ b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp @@ -348,7 +348,7 @@ void BuiltInPDFView::calculateSizes() bool BuiltInPDFView::initialize(const Parameters& parameters) { - m_frame->coreFrame()->page()->addScrollableArea(this); + m_frame->coreFrame()->view()->addScrollableArea(this); // Load the src URL if needed. m_sourceURL = parameters.url; @@ -361,8 +361,8 @@ bool BuiltInPDFView::initialize(const Parameters& parameters) void BuiltInPDFView::destroy() { if (m_frame) { - if (Page* page = m_frame->coreFrame()->page()) - page->removeScrollableArea(this); + if (FrameView* frameView = m_frame->coreFrame()->view()) + frameView->removeScrollableArea(this); } destroyScrollbar(HorizontalScrollbar); diff --git a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h index 6ee4bf3c5..c185c1871 100644 --- a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h +++ b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h @@ -138,7 +138,6 @@ private: virtual WebCore::Scrollbar* horizontalScrollbar() const { return m_horizontalScrollbar.get(); } virtual WebCore::Scrollbar* verticalScrollbar() const { return m_verticalScrollbar.get(); } virtual bool isOnActivePage() const; - virtual void disconnectFromPage() { m_frame = 0; } virtual bool shouldSuspendScrollAnimations() const { return false; } // If we return true, ScrollAnimatorMac will keep cycling a timer forever, waiting for a good time to animate. virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate); virtual void zoomAnimatorTransformChanged(float, float, float, ZoomAnimationState) { } diff --git a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp index 5b915dc40..8935dcf78 100644 --- a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp +++ b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp @@ -631,8 +631,11 @@ void PluginView::handleEvent(Event* event) // We have a mouse event. // FIXME: Clicking in a scroll bar should not change focus. - if (currentEvent->type() == WebEvent::MouseDown) + if (currentEvent->type() == WebEvent::MouseDown) { focusPluginElement(); + frame()->eventHandler()->setCapturingMouseEventsNode(m_pluginElement.get()); + } else if (currentEvent->type() == WebEvent::MouseUp) + frame()->eventHandler()->setCapturingMouseEventsNode(0); didHandleEvent = m_plugin->handleMouseEvent(static_cast(*currentEvent)); } else if (event->type() == eventNames().mousewheelEvent && currentEvent->type() == WebEvent::Wheel) { -- cgit v1.2.1