Title: [112142] trunk/Source
Revision
112142
Author
[email protected]
Date
2012-03-26 12:43:16 -0700 (Mon, 26 Mar 2012)

Log Message

Scrollable plugins not registered properly in ScrollingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=82163

Reviewed by Anders Carlsson.

Source/WebCore:

Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::nonFastScrollableRegion):
(WebCore):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::scrollable):
(PluginViewBase):

Source/WebKit/chromium:

* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::scrollable):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112141 => 112142)


--- trunk/Source/WebCore/ChangeLog	2012-03-26 19:41:38 UTC (rev 112141)
+++ trunk/Source/WebCore/ChangeLog	2012-03-26 19:43:16 UTC (rev 112142)
@@ -1,3 +1,22 @@
+2012-03-26  James Robinson  <[email protected]>
+
+        Scrollable plugins not registered properly in ScrollingCoordinator
+        https://bugs.webkit.org/show_bug.cgi?id=82163
+
+        Reviewed by Anders Carlsson.
+
+        Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually.
+
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::computeNonFastScrollableRegion):
+        (WebCore::ScrollingCoordinator::nonFastScrollableRegion):
+        (WebCore):
+        * page/scrolling/ScrollingCoordinator.h:
+        (ScrollingCoordinator):
+        * plugins/PluginViewBase.h:
+        (WebCore::PluginViewBase::scrollable):
+        (PluginViewBase):
+
 2012-03-26  Joone Hur  <[email protected]>
 
         [GTK] Build fix for Accelerated Compositing with Clutter

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (112141 => 112142)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-03-26 19:41:38 UTC (rev 112141)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-03-26 19:43:16 UTC (rev 112142)
@@ -32,6 +32,7 @@
 #include "IntRect.h"
 #include "Page.h"
 #include "PlatformWheelEvent.h"
+#include "PluginViewBase.h"
 #include "Region.h"
 #include "RenderView.h"
 #include "ScrollAnimator.h"
@@ -111,6 +112,10 @@
     for (HashSet<RefPtr<Widget> >::const_iterator it = frameView->children()->begin(), end = frameView->children()->end(); it != end; ++it) {
         if ((*it)->isFrameView())
             childFrameViews.add(static_cast<FrameView*>(it->get()));
+        else if ((*it)->isPluginViewBase()) {
+            if (static_cast<PluginViewBase*>(it->get())->wantWheelEvents())
+                nonFastScrollableRegion.unite((*it)->frameRect());
+        }
     }
 
     if (const FrameView::ScrollableAreaSet* scrollableAreas = frameView->scrollableAreas()) {

Modified: trunk/Source/WebCore/plugins/PluginViewBase.h (112141 => 112142)


--- trunk/Source/WebCore/plugins/PluginViewBase.h	2012-03-26 19:41:38 UTC (rev 112141)
+++ trunk/Source/WebCore/plugins/PluginViewBase.h	2012-03-26 19:43:16 UTC (rev 112142)
@@ -53,6 +53,8 @@
     virtual bool getFormValue(String&) { return false; }
     virtual bool scroll(ScrollDirection, ScrollGranularity) { return false; }
 
+    virtual bool wantWheelEvents() { return false; }
+
     // A plug-in can ask WebKit to handle scrollbars for it.
     virtual Scrollbar* horizontalScrollbar() { return 0; }
     virtual Scrollbar* verticalScrollbar() { return 0; }

Modified: trunk/Source/WebKit/chromium/ChangeLog (112141 => 112142)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-26 19:41:38 UTC (rev 112141)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-26 19:43:16 UTC (rev 112142)
@@ -1,3 +1,15 @@
+2012-03-26  James Robinson  <[email protected]>
+
+        Scrollable plugins not registered properly in ScrollingCoordinator
+        https://bugs.webkit.org/show_bug.cgi?id=82163
+
+        Reviewed by Anders Carlsson.
+
+        * src/WebPluginContainerImpl.cpp:
+        (WebKit::WebPluginContainerImpl::scrollable):
+        * src/WebPluginContainerImpl.h:
+        (WebPluginContainerImpl):
+
 2012-03-26  W. James MacLean  <[email protected]>
 
         [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel.

Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (112141 => 112142)


--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2012-03-26 19:41:38 UTC (rev 112141)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2012-03-26 19:43:16 UTC (rev 112142)
@@ -518,6 +518,10 @@
 }
 #endif
 
+bool WebPluginContainerImpl::wantWheelEvents()
+{
+    return m_scrollbarGroup;
+}
 
 ScrollbarGroup* WebPluginContainerImpl::scrollbarGroup()
 {

Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.h (112141 => 112142)


--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.h	2012-03-26 19:41:38 UTC (rev 112141)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.h	2012-03-26 19:43:16 UTC (rev 112142)
@@ -73,6 +73,7 @@
 
     // PluginViewBase methods
     virtual bool getFormValue(String&);
+    virtual bool wantWheelEvents();
 
     // Widget methods
     virtual void setFrameRect(const WebCore::IntRect&);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to