| Index: Source/core/page/EventHandler.cpp
|
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
|
| index f32a579c0cb86dbe09e7a2250c02e1d1e726b4f3..48755762e58ad673a712f24fdebb0e1df84e05f1 100644
|
| --- a/Source/core/page/EventHandler.cpp
|
| +++ b/Source/core/page/EventHandler.cpp
|
| @@ -24,7 +24,6 @@
|
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
| -
|
| #include "config.h"
|
| #include "core/page/EventHandler.h"
|
|
|
| @@ -2114,7 +2113,7 @@ bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& re
|
| #endif
|
| }
|
|
|
| -bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e)
|
| +bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e, bool canRubberbandLeft, bool canRubberbandRight)
|
| {
|
| #define RETURN_WHEEL_EVENT_HANDLED() \
|
| { \
|
| @@ -2178,8 +2177,9 @@ bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e)
|
|
|
| if (isOverWidget && target && target->isWidget()) {
|
| Widget* widget = toRenderWidget(target)->widget();
|
| - if (widget && passWheelEventToWidget(e, widget))
|
| + if (widget && passWheelEventToWidget(e, widget, canRubberbandLeft, canRubberbandRight)) {
|
| RETURN_WHEEL_EVENT_HANDLED();
|
| + }
|
| }
|
|
|
| if (node && !node->dispatchWheelEvent(event))
|
| @@ -2195,7 +2195,7 @@ bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e)
|
|
|
| // We do another check on the frame view because the event handler can run JS which results in the frame getting destroyed.
|
| view = m_frame->view();
|
| - if (!view || !view->wheelEvent(event))
|
| + if (!view || !view->wheelEvent(event, canRubberbandLeft, canRubberbandRight))
|
| return false;
|
|
|
| RETURN_WHEEL_EVENT_HANDLED();
|
| @@ -2650,7 +2650,7 @@ bool EventHandler::sendScrollEventToView(const PlatformGestureEvent& gestureEven
|
| gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
|
| syntheticWheelEvent.setHasPreciseScrollingDeltas(true);
|
|
|
| - bool scrolledFrame = view->wheelEvent(syntheticWheelEvent);
|
| + bool scrolledFrame = view->wheelEvent(syntheticWheelEvent, true, true);
|
| if (scrolledFrame)
|
| setFrameWasScrolledByUser();
|
|
|
| @@ -3987,7 +3987,7 @@ bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults&
|
| return true;
|
| }
|
|
|
| -bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& wheelEvent, Widget* widget)
|
| +bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& wheelEvent, Widget* widget, bool canRubberbandLeft, bool canRubberbandRight)
|
| {
|
| // We can sometimes get a null widget! EventHandlerMac handles a null
|
| // widget by returning false, so we do the same.
|
| @@ -3999,7 +3999,7 @@ bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& wheelEvent,
|
| if (!widget->isFrameView())
|
| return false;
|
|
|
| - return toFrameView(widget)->frame().eventHandler().handleWheelEvent(wheelEvent);
|
| + return toFrameView(widget)->frame().eventHandler().handleWheelEvent(wheelEvent, canRubberbandLeft, canRubberbandRight);
|
| }
|
|
|
| bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
|
|
|