Diff
Modified: trunk/Source/WebCore/ChangeLog (96632 => 96633)
--- trunk/Source/WebCore/ChangeLog 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/ChangeLog 2011-10-04 20:11:04 UTC (rev 96633)
@@ -1,3 +1,38 @@
+2011-10-04 Anders Carlsson <ander...@apple.com>
+
+ Remove PlatformWheelEvent::m_isAccepted
+ https://bugs.webkit.org/show_bug.cgi?id=69357
+
+ Reviewed by Darin Adler.
+
+ Remove PlatformWheelEvent::m_isAccepted and all the getters/setters.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleWheelEvent):
+ (WebCore::EventHandler::handleGestureEvent):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::wheelEvent):
+ * platform/PlatformWheelEvent.h:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+ * platform/ScrollAnimator.cpp:
+ (WebCore::ScrollAnimator::handleWheelEvent):
+ * platform/chromium/PopupContainer.cpp:
+ (WebCore::PopupContainer::handleGestureEvent):
+ * platform/chromium/ScrollAnimatorChromiumMac.mm:
+ (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
+ * platform/efl/PlatformWheelEventEfl.cpp:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+ * platform/mac/ScrollAnimatorMac.mm:
+ (WebCore::ScrollAnimatorMac::handleWheelEvent):
+ * platform/mac/WheelEventMac.mm:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+ * platform/qt/WheelEventQt.cpp:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+ * platform/win/WheelEventWin.cpp:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+ * platform/wx/MouseWheelEventWx.cpp:
+ (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+
2011-09-21 Cris Neckar <c...@chromium.org>
Hold refptr to identified previous sibling within findPlaceForCounter.
Modified: trunk/Source/WebCore/page/EventHandler.cpp (96632 => 96633)
--- trunk/Source/WebCore/page/EventHandler.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -2176,32 +2176,22 @@
if (isOverWidget && target && target->isWidget()) {
Widget* widget = toRenderWidget(target)->widget();
- if (widget && passWheelEventToWidget(e, widget)) {
- e.accept();
+ if (widget && passWheelEventToWidget(e, widget))
return true;
- }
}
node = node->shadowAncestorNode();
- if (node && !node->dispatchWheelEvent(e)) {
- e.accept();
+ if (node && !node->dispatchWheelEvent(e))
return true;
- }
}
- // isAccepted can't be true here, because then we would already have returned from this function.
- ASSERT(!e.isAccepted());
-
// 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)
return false;
- bool handled = view->wheelEvent(e);
- ASSERT(handled == e.isAccepted());
-
- return handled;
+ return view->wheelEvent(e);
}
void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEvent)
@@ -2251,7 +2241,7 @@
// FIXME: Replace this interim implementation once the above fixme has been addressed.
IntPoint point(gestureEvent.position().x(), gestureEvent.position().y());
IntPoint globalPoint(gestureEvent.globalPosition().x(), gestureEvent.globalPosition().y());
- PlatformWheelEvent syntheticWheelEvent(point, globalPoint, gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / tickDivisor, gestureEvent.deltaY() / tickDivisor, ScrollByPixelWheelEvent, /* isAccepted */ false, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
+ PlatformWheelEvent syntheticWheelEvent(point, globalPoint, gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / tickDivisor, gestureEvent.deltaY() / tickDivisor, ScrollByPixelWheelEvent, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
handleWheelEvent(syntheticWheelEvent);
return true;
}
Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (96632 => 96633)
--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2011-10-04 20:11:04 UTC (rev 96633)
@@ -106,10 +106,7 @@
CurrentEventScope scope(event);
PlatformWheelEvent wheelEvent(event, page->chrome()->platformPageClient());
- bool handled = handleWheelEvent(wheelEvent);
-
- ASSERT(handled == wheelEvent.isAccepted());
- return handled;
+ return handleWheelEvent(wheelEvent);
}
bool EventHandler::keyEvent(NSEvent *event)
Modified: trunk/Source/WebCore/platform/PlatformWheelEvent.h (96632 => 96633)
--- trunk/Source/WebCore/platform/PlatformWheelEvent.h 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/PlatformWheelEvent.h 2011-10-04 20:11:04 UTC (rev 96633)
@@ -92,7 +92,6 @@
, m_wheelTicksX(0)
, m_wheelTicksY(0)
, m_granularity(ScrollByPixelWheelEvent)
- , m_isAccepted(false)
, m_shiftKey(false)
, m_ctrlKey(false)
, m_altKey(false)
@@ -107,7 +106,7 @@
{
}
- PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranularity granularity, bool isAccepted, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
+ PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranularity granularity, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
: m_position(position)
, m_globalPosition(globalPosition)
, m_deltaX(deltaX)
@@ -115,7 +114,6 @@
, m_wheelTicksX(wheelTicksX)
, m_wheelTicksY(wheelTicksY)
, m_granularity(granularity)
- , m_isAccepted(isAccepted)
, m_shiftKey(shiftKey)
, m_ctrlKey(ctrlKey)
, m_altKey(altKey)
@@ -141,7 +139,6 @@
PlatformWheelEventGranularity granularity() const { return m_granularity; }
- bool isAccepted() const { return m_isAccepted; }
bool shiftKey() const { return m_shiftKey; }
bool ctrlKey() const { return m_ctrlKey; }
bool altKey() const { return m_altKey; }
@@ -154,9 +151,6 @@
bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedFromDevice; }
- void accept() { m_isAccepted = true; }
- void ignore() { m_isAccepted = false; }
-
void turnVerticalTicksIntoHorizontal()
{
m_deltaX = m_deltaY;
@@ -214,7 +208,6 @@
float m_wheelTicksX;
float m_wheelTicksY;
PlatformWheelEventGranularity m_granularity;
- bool m_isAccepted;
bool m_shiftKey;
bool m_ctrlKey;
bool m_altKey;
Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (96632 => 96633)
--- trunk/Source/WebCore/platform/ScrollAnimator.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -99,7 +99,6 @@
|| (deltaX > 0 && maxBackwardScrollDelta.width() > 0)
|| (deltaY < 0 && maxForwardScrollDelta.height() > 0)
|| (deltaY > 0 && maxBackwardScrollDelta.height() > 0)) {
- e.accept();
handled = true;
if (e.granularity() == ScrollByPageWheelEvent) {
ASSERT(!e.deltaX());
@@ -115,7 +114,6 @@
scroll(HorizontalScrollbar, ScrollByPixel, horizontalScrollbar->pixelStep(), -deltaX);
}
- ASSERT(e.isAccepted() == handled);
return handled;
}
Modified: trunk/Source/WebCore/platform/chromium/PopupContainer.cpp (96632 => 96633)
--- trunk/Source/WebCore/platform/chromium/PopupContainer.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/chromium/PopupContainer.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -309,7 +309,7 @@
case PlatformGestureEvent::DoubleTapType:
break;
case PlatformGestureEvent::ScrollUpdateType: {
- PlatformWheelEvent syntheticWheelEvent(gestureEvent.position(), gestureEvent.globalPosition(), gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / 120.0f, gestureEvent.deltaY() / 120.0f, ScrollByPixelWheelEvent, /* isAccepted */ false, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
+ PlatformWheelEvent syntheticWheelEvent(gestureEvent.position(), gestureEvent.globalPosition(), gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / 120.0f, gestureEvent.deltaY() / 120.0f, ScrollByPixelWheelEvent, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
handleWheelEvent(syntheticWheelEvent);
return true;
}
Modified: trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm (96632 => 96633)
--- trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm 2011-10-04 20:11:04 UTC (rev 96633)
@@ -832,13 +832,11 @@
if (m_ignoreMomentumScrolls && (isMomentumScrollEvent || m_snapRubberBandTimer.isActive())) {
if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseEnded) {
m_ignoreMomentumScrolls = false;
- wheelEvent.accept();
return true;
}
return false;
}
- wheelEvent.accept();
smoothScrollWithEvent(wheelEvent);
return true;
}
Modified: trunk/Source/WebCore/platform/efl/PlatformWheelEventEfl.cpp (96632 => 96633)
--- trunk/Source/WebCore/platform/efl/PlatformWheelEventEfl.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/efl/PlatformWheelEventEfl.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -46,7 +46,6 @@
: m_position(IntPoint(ev->canvas.x, ev->canvas.y))
, m_globalPosition(IntPoint(ev->canvas.x, ev->canvas.y))
, m_granularity(ScrollByPixelWheelEvent)
- , m_isAccepted(false)
, m_shiftKey(evas_key_modifier_is_set(ev->modifiers, "Shift"))
, m_ctrlKey(evas_key_modifier_is_set(ev->modifiers, "Control"))
, m_altKey(evas_key_modifier_is_set(ev->modifiers, "Alt"))
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (96632 => 96633)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2011-10-04 20:11:04 UTC (rev 96633)
@@ -844,13 +844,11 @@
if (m_ignoreMomentumScrolls && (isMomentumScrollEvent || m_snapRubberBandTimer.isActive())) {
if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseEnded) {
m_ignoreMomentumScrolls = false;
- wheelEvent.accept();
return true;
}
return false;
}
- wheelEvent.accept();
smoothScrollWithEvent(wheelEvent);
return true;
}
Modified: trunk/Source/WebCore/platform/mac/WheelEventMac.mm (96632 => 96633)
--- trunk/Source/WebCore/platform/mac/WheelEventMac.mm 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/mac/WheelEventMac.mm 2011-10-04 20:11:04 UTC (rev 96633)
@@ -93,7 +93,6 @@
: m_position(pointForEvent(event, windowView))
, m_globalPosition(globalPointForEvent(event))
, m_granularity(ScrollByPixelWheelEvent)
- , m_isAccepted(false)
, m_shiftKey([event modifierFlags] & NSShiftKeyMask)
, m_ctrlKey([event modifierFlags] & NSControlKeyMask)
, m_altKey([event modifierFlags] & NSAlternateKeyMask)
Modified: trunk/Source/WebCore/platform/qt/WheelEventQt.cpp (96632 => 96633)
--- trunk/Source/WebCore/platform/qt/WheelEventQt.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/qt/WheelEventQt.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -62,7 +62,6 @@
: m_position(e->pos().toPoint())
, m_globalPosition(e->screenPos())
, m_granularity(ScrollByPixelWheelEvent)
- , m_isAccepted(false)
, m_shiftKey(e->modifiers() & Qt::ShiftModifier)
, m_ctrlKey(e->modifiers() & Qt::ControlModifier)
, m_altKey(e->modifiers() & Qt::AltModifier)
@@ -82,7 +81,6 @@
: m_position(e->pos())
, m_globalPosition(e->globalPos())
, m_granularity(ScrollByPixelWheelEvent)
- , m_isAccepted(false)
, m_shiftKey(e->modifiers() & Qt::ShiftModifier)
, m_ctrlKey(e->modifiers() & Qt::ControlModifier)
, m_altKey(e->modifiers() & Qt::AltModifier)
Modified: trunk/Source/WebCore/platform/win/WheelEventWin.cpp (96632 => 96633)
--- trunk/Source/WebCore/platform/win/WheelEventWin.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/win/WheelEventWin.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -66,8 +66,7 @@
}
PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, const FloatSize& delta, const FloatPoint& location)
- : m_isAccepted(false)
- , m_shiftKey(false)
+ : m_shiftKey(false)
, m_ctrlKey(false)
, m_altKey(false)
, m_metaKey(false)
@@ -91,7 +90,6 @@
PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, WPARAM wParam, LPARAM lParam, bool isMouseHWheel)
: m_position(positionForEvent(hWnd, lParam))
, m_globalPosition(globalPositionForEvent(hWnd, lParam))
- , m_isAccepted(false)
, m_shiftKey(wParam & MK_SHIFT)
, m_ctrlKey(wParam & MK_CONTROL)
, m_altKey(GetKeyState(VK_MENU) & HIGH_BIT_MASK_SHORT)
Modified: trunk/Source/WebCore/platform/wx/MouseWheelEventWx.cpp (96632 => 96633)
--- trunk/Source/WebCore/platform/wx/MouseWheelEventWx.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebCore/platform/wx/MouseWheelEventWx.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -44,7 +44,6 @@
, m_deltaY(event.GetWheelRotation() / event.GetWheelDelta())
, m_wheelTicksX(m_deltaX)
, m_wheelTicksY(m_deltaY)
- , m_isAccepted(false)
, m_directionInvertedFromDevice(false)
{
// FIXME: retrieve the user setting for the number of lines to scroll on each wheel event
Modified: trunk/Source/WebKit/chromium/ChangeLog (96632 => 96633)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-10-04 20:11:04 UTC (rev 96633)
@@ -1,3 +1,18 @@
+2011-10-04 Anders Carlsson <ander...@apple.com>
+
+ Remove PlatformWheelEvent::m_isAccepted
+ https://bugs.webkit.org/show_bug.cgi?id=69357
+
+ Reviewed by Darin Adler.
+
+ * src/WebInputEventConversion.cpp:
+ (WebKit::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
+ m_isAccepted has been removed.
+
+ * src/WebScrollbarImpl.cpp:
+ (WebKit::WebScrollbarImpl::onMouseWheel):
+ Just return the value of handleWheelEvent.
+
2011-10-04 Yury Semikhatsky <yu...@chromium.org>
[Chromium] Web Inspector: save inspector state into single string instead of string map
Modified: trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp (96632 => 96633)
--- trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -98,7 +98,6 @@
m_deltaY = e.deltaY;
m_wheelTicksX = e.wheelTicksX;
m_wheelTicksY = e.wheelTicksY;
- m_isAccepted = false;
m_granularity = e.scrollByPage ?
ScrollByPageWheelEvent : ScrollByPixelWheelEvent;
m_shiftKey = (e.modifiers & WebInputEvent::ShiftKey);
Modified: trunk/Source/WebKit/chromium/src/WebScrollbarImpl.cpp (96632 => 96633)
--- trunk/Source/WebKit/chromium/src/WebScrollbarImpl.cpp 2011-10-04 19:47:32 UTC (rev 96632)
+++ trunk/Source/WebKit/chromium/src/WebScrollbarImpl.cpp 2011-10-04 20:11:04 UTC (rev 96633)
@@ -249,8 +249,7 @@
{
WebMouseWheelEvent mousewheel = *static_cast<const WebMouseWheelEvent*>(&event);
PlatformWheelEventBuilder platformEvent(m_scrollbar.get(), mousewheel);
- m_group->handleWheelEvent(platformEvent);
- return platformEvent.isAccepted();
+ return m_group->handleWheelEvent(platformEvent);
}
bool WebScrollbarImpl::onKeyDown(const WebInputEvent& event)