Index: Source/web/WebPluginContainerImpl.cpp |
diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp |
index 53456d742a1218164871908717710a384c01d3a6..ab08dfd73ccb8081b4511498eb05efc1feb05316 100644 |
--- a/Source/web/WebPluginContainerImpl.cpp |
+++ b/Source/web/WebPluginContainerImpl.cpp |
@@ -88,7 +88,6 @@ |
#include "public/web/WebPrintPresetOptions.h" |
#include "public/web/WebViewClient.h" |
#include "web/ChromeClientImpl.h" |
-#include "web/ScrollbarGroup.h" |
#include "web/WebDataSourceImpl.h" |
#include "web/WebInputEventConversion.h" |
#include "web/WebViewImpl.h" |
@@ -424,11 +423,6 @@ void WebPluginContainerImpl::reportGeometry() |
calculateGeometry(windowRect, clipRect, unobscuredRect, cutOutRects); |
m_webPlugin->updateGeometry(windowRect, clipRect, unobscuredRect, cutOutRects, isVisible()); |
- |
- if (m_scrollbarGroup) { |
- m_scrollbarGroup->scrollAnimator()->contentsResized(); |
- m_scrollbarGroup->setFrameRect(frameRect()); |
- } |
} |
void WebPluginContainerImpl::allowScriptObjects() |
@@ -684,25 +678,6 @@ void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver |
m_pluginLoadObservers.remove(pos); |
} |
-ScrollbarGroup* WebPluginContainerImpl::scrollbarGroup() |
-{ |
- if (!m_scrollbarGroup) |
- m_scrollbarGroup = adoptPtr(new ScrollbarGroup(m_element->document().frame()->view(), frameRect())); |
- return m_scrollbarGroup.get(); |
-} |
- |
-void WebPluginContainerImpl::willStartLiveResize() |
-{ |
- if (m_scrollbarGroup) |
- m_scrollbarGroup->willStartLiveResize(); |
-} |
- |
-void WebPluginContainerImpl::willEndLiveResize() |
-{ |
- if (m_scrollbarGroup) |
- m_scrollbarGroup->willEndLiveResize(); |
-} |
- |
// Private methods ------------------------------------------------------------- |
WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, WebPlugin* webPlugin) |
@@ -745,7 +720,6 @@ void WebPluginContainerImpl::dispose() |
GraphicsLayer::unregisterContentsLayer(m_webLayer); |
m_pluginLoadObservers.clear(); |
- m_scrollbarGroup.clear(); |
m_element = nullptr; |
} |
@@ -792,18 +766,6 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) |
if (event->type() == EventTypeNames::mousedown) |
focusPlugin(); |
- if (m_scrollbarGroup) { |
- // This needs to be set before the other callbacks in this scope, since |
- // the scroll animator class might query the position in response. |
- m_scrollbarGroup->setLastMousePosition(IntPoint(event->x(), event->y())); |
- if (event->type() == EventTypeNames::mousemove) |
- m_scrollbarGroup->scrollAnimator()->mouseMovedInContentArea(); |
- else if (event->type() == EventTypeNames::mouseover) |
- m_scrollbarGroup->scrollAnimator()->mouseEnteredContentArea(); |
- else if (event->type() == EventTypeNames::mouseout) |
- m_scrollbarGroup->scrollAnimator()->mouseExitedContentArea(); |
- } |
- |
WebCursorInfo cursorInfo; |
if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) |
event->setDefaultHandled(); |
@@ -922,14 +884,6 @@ void WebPluginContainerImpl::handleTouchEvent(TouchEvent* event) |
} |
} |
-static inline bool gestureScrollHelper(ScrollbarGroup* scrollbarGroup, ScrollDirectionPhysical positiveDirection, ScrollDirectionPhysical negativeDirection, float delta) |
-{ |
- if (!delta) |
- return false; |
- float absDelta = delta > 0 ? delta : -delta; |
- return scrollbarGroup->scroll(delta < 0 ? negativeDirection : positiveDirection, ScrollByPrecisePixel, absDelta); |
-} |
- |
void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event) |
{ |
WebGestureEventBuilder webEvent(m_element->layoutObject(), *event); |
@@ -943,14 +897,6 @@ void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event) |
return; |
} |
- if (webEvent.type == WebInputEvent::GestureScrollUpdate) { |
- if (!m_scrollbarGroup) |
- return; |
- if (gestureScrollHelper(m_scrollbarGroup.get(), ScrollLeft, ScrollRight, webEvent.data.scrollUpdate.deltaX)) |
- event->setDefaultHandled(); |
- if (gestureScrollHelper(m_scrollbarGroup.get(), ScrollUp, ScrollDown, webEvent.data.scrollUpdate.deltaY)) |
- event->setDefaultHandled(); |
- } |
// FIXME: Can a plugin change the cursor from a touch-event callback? |
} |