Title: [136416] branches/chromium/1312
- Revision
- 136416
- Author
- t...@chromium.org
- Date
- 2012-12-03 10:50:35 -0800 (Mon, 03 Dec 2012)
Log Message
Merge 135178
> [Chromium] Flash cannot receive scroll events when threaded compositing is in use
> https://bugs.webkit.org/show_bug.cgi?id=101423
>
> Patch by Yusuke Sato <yusu...@chromium.org> on 2012-11-19
> Reviewed by James Robinson.
>
> Source/WebKit/chromium:
>
> Add setWantsWheelEvents() to Chromium's WebPluginContainer interface so that a plugin can tell the
> container that the plugin always wants to handle wheel events even when a scroll bar is not shown.
>
> * public/WebPluginContainer.h:
> (WebPluginContainer):
> * src/WebPluginContainerImpl.cpp:
> (WebKit::WebPluginContainerImpl::setWantsWheelEvents):
> (WebKit):
> (WebKit::WebPluginContainerImpl::wantsWheelEvents):
> (WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
> * src/WebPluginContainerImpl.h:
> (WebPluginContainerImpl):
>
> Tools:
>
> Call setWantsWheelEvents(true) in initialize() so that gesture-events and transformed-events tests in
> LayoutTests/platform/chromium/plugins/ will not fail even if a buildbot introduces threaded compositing
> in the future.
>
> * DumpRenderTree/chromium/TestWebPlugin.cpp:
> (TestWebPlugin::initialize):
TBR=commit-qu...@webkit.org
Review URL: https://codereview.chromium.org/11411321
Modified Paths
Diff
Modified: branches/chromium/1312/Source/WebKit/chromium/ChangeLog (136415 => 136416)
--- branches/chromium/1312/Source/WebKit/chromium/ChangeLog 2012-12-03 18:46:06 UTC (rev 136415)
+++ branches/chromium/1312/Source/WebKit/chromium/ChangeLog 2012-12-03 18:50:35 UTC (rev 136416)
@@ -1,3 +1,23 @@
+2012-11-19 Yusuke Sato <yusu...@chromium.org>
+
+ [Chromium] Flash cannot receive scroll events when threaded compositing is in use
+ https://bugs.webkit.org/show_bug.cgi?id=101423
+
+ Reviewed by James Robinson.
+
+ Add setWantsWheelEvents() to Chromium's WebPluginContainer interface so that a plugin can tell the
+ container that the plugin always wants to handle wheel events even when a scroll bar is not shown.
+
+ * public/WebPluginContainer.h:
+ (WebPluginContainer):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::setWantsWheelEvents):
+ (WebKit):
+ (WebKit::WebPluginContainerImpl::wantsWheelEvents):
+ (WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
+ * src/WebPluginContainerImpl.h:
+ (WebPluginContainerImpl):
+
2012-11-20 Tony Chang <t...@chromium.org>
When calling DocumentStyleSheetCollection::addUserSheet, pass in a user sheet
Modified: branches/chromium/1312/Source/WebKit/chromium/public/WebPluginContainer.h (136415 => 136416)
--- branches/chromium/1312/Source/WebKit/chromium/public/WebPluginContainer.h 2012-12-03 18:46:06 UTC (rev 136415)
+++ branches/chromium/1312/Source/WebKit/chromium/public/WebPluginContainer.h 2012-12-03 18:50:35 UTC (rev 136416)
@@ -111,6 +111,12 @@
// Notifies when the plugin starts/stops accepting touch events.
virtual void setIsAcceptingTouchEvents(bool) = 0;
+ // Notifies when the plugin starts/stops accepting wheel events. Without
+ // calling the function with true, the container might not always able to
+ // receive wheel events in some cases (such as when threaded compositing
+ // is in use but a scroll bar is not in use).
+ virtual void setWantsWheelEvents(bool) = 0;
+
virtual WebPlugin* plugin() = 0;
virtual void setPlugin(WebPlugin*) = 0;
Modified: branches/chromium/1312/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (136415 => 136416)
--- branches/chromium/1312/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2012-12-03 18:46:06 UTC (rev 136415)
+++ branches/chromium/1312/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2012-12-03 18:50:35 UTC (rev 136416)
@@ -67,6 +67,7 @@
#include "ScrollAnimator.h"
#include "ScrollView.h"
#include "ScrollbarTheme.h"
+#include "ScrollingCoordinator.h"
#include "TouchEvent.h"
#include "UserGestureIndicator.h"
#include "WebPrintParams.h"
@@ -532,6 +533,19 @@
m_element->document()->didRemoveTouchEventHandler();
}
+void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents)
+{
+ if (m_wantsWheelEvents == wantsWheelEvents)
+ return;
+ m_wantsWheelEvents = wantsWheelEvents;
+ if (Page* page = m_element->document()->page()) {
+ if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) {
+ if (parent() && parent()->isFrameView())
+ scrollingCoordinator->frameViewLayoutUpdated(static_cast<FrameView*>(parent()));
+ }
+ }
+}
+
void WebPluginContainerImpl::didReceiveResponse(const ResourceResponse& response)
{
// Make sure that the plugin receives window geometry before data, or else
@@ -582,6 +596,11 @@
return m_webPlugin->canProcessDrag();
}
+bool WebPluginContainerImpl::wantsWheelEvents()
+{
+ return m_wantsWheelEvents;
+}
+
void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver* observer)
{
size_t pos = m_pluginLoadObservers.find(observer);
@@ -641,6 +660,7 @@
, m_ioSurfaceId(0)
#endif
, m_isAcceptingTouchEvents(false)
+ , m_wantsWheelEvents(false)
{
}
Modified: branches/chromium/1312/Source/WebKit/chromium/src/WebPluginContainerImpl.h (136415 => 136416)
--- branches/chromium/1312/Source/WebKit/chromium/src/WebPluginContainerImpl.h 2012-12-03 18:46:06 UTC (rev 136415)
+++ branches/chromium/1312/Source/WebKit/chromium/src/WebPluginContainerImpl.h 2012-12-03 18:50:35 UTC (rev 136416)
@@ -79,6 +79,7 @@
virtual bool getFormValue(String&);
virtual bool supportsKeyboardFocus() const;
virtual bool canProcessDrag() const;
+ virtual bool wantsWheelEvents();
// Widget methods
virtual void setFrameRect(const WebCore::IntRect&);
@@ -113,6 +114,7 @@
virtual void setOpaque(bool);
virtual bool isRectTopmost(const WebRect&);
virtual void setIsAcceptingTouchEvents(bool);
+ virtual void setWantsWheelEvents(bool);
// This cannot be null.
WebPlugin* plugin() { return m_webPlugin; }
@@ -199,6 +201,7 @@
OwnPtr<ScrollbarGroup> m_scrollbarGroup;
bool m_isAcceptingTouchEvents;
+ bool m_wantsWheelEvents;
};
} // namespace WebKit
Modified: branches/chromium/1312/Tools/ChangeLog (136415 => 136416)
--- branches/chromium/1312/Tools/ChangeLog 2012-12-03 18:46:06 UTC (rev 136415)
+++ branches/chromium/1312/Tools/ChangeLog 2012-12-03 18:50:35 UTC (rev 136416)
@@ -1,3 +1,17 @@
+2012-11-19 Yusuke Sato <yusu...@chromium.org>
+
+ [Chromium] Flash cannot receive scroll events when threaded compositing is in use
+ https://bugs.webkit.org/show_bug.cgi?id=101423
+
+ Reviewed by James Robinson.
+
+ Call setWantsWheelEvents(true) in initialize() so that gesture-events and transformed-events tests in
+ LayoutTests/platform/chromium/plugins/ will not fail even if a buildbot introduces threaded compositing
+ in the future.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (TestWebPlugin::initialize):
+
2012-10-29 Christophe Dumez <christophe.du...@intel.com>
[CMAKE] Add TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp to CMakeLists.txt
Modified: branches/chromium/1312/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp (136415 => 136416)
--- branches/chromium/1312/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp 2012-12-03 18:46:06 UTC (rev 136415)
+++ branches/chromium/1312/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp 2012-12-03 18:50:35 UTC (rev 136416)
@@ -184,6 +184,7 @@
m_container = container;
m_container->setBackingTextureId(m_colorTexture);
m_container->setIsAcceptingTouchEvents(m_acceptsTouchEvent);
+ m_container->setWantsWheelEvents(true);
return true;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes