Changeset 96633 in webkit
- Timestamp:
- Oct 4, 2011 1:11:04 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96632 r96633 1 2011-10-04 Anders Carlsson <andersca@apple.com> 2 3 Remove PlatformWheelEvent::m_isAccepted 4 https://bugs.webkit.org/show_bug.cgi?id=69357 5 6 Reviewed by Darin Adler. 7 8 Remove PlatformWheelEvent::m_isAccepted and all the getters/setters. 9 10 * page/EventHandler.cpp: 11 (WebCore::EventHandler::handleWheelEvent): 12 (WebCore::EventHandler::handleGestureEvent): 13 * page/mac/EventHandlerMac.mm: 14 (WebCore::EventHandler::wheelEvent): 15 * platform/PlatformWheelEvent.h: 16 (WebCore::PlatformWheelEvent::PlatformWheelEvent): 17 * platform/ScrollAnimator.cpp: 18 (WebCore::ScrollAnimator::handleWheelEvent): 19 * platform/chromium/PopupContainer.cpp: 20 (WebCore::PopupContainer::handleGestureEvent): 21 * platform/chromium/ScrollAnimatorChromiumMac.mm: 22 (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): 23 * platform/efl/PlatformWheelEventEfl.cpp: 24 (WebCore::PlatformWheelEvent::PlatformWheelEvent): 25 * platform/mac/ScrollAnimatorMac.mm: 26 (WebCore::ScrollAnimatorMac::handleWheelEvent): 27 * platform/mac/WheelEventMac.mm: 28 (WebCore::PlatformWheelEvent::PlatformWheelEvent): 29 * platform/qt/WheelEventQt.cpp: 30 (WebCore::PlatformWheelEvent::PlatformWheelEvent): 31 * platform/win/WheelEventWin.cpp: 32 (WebCore::PlatformWheelEvent::PlatformWheelEvent): 33 * platform/wx/MouseWheelEventWx.cpp: 34 (WebCore::PlatformWheelEvent::PlatformWheelEvent): 35 1 36 2011-09-21 Cris Neckar <cdn@chromium.org> 2 37 -
trunk/Source/WebCore/page/EventHandler.cpp
r96617 r96633 2177 2177 if (isOverWidget && target && target->isWidget()) { 2178 2178 Widget* widget = toRenderWidget(target)->widget(); 2179 if (widget && passWheelEventToWidget(e, widget)) { 2180 e.accept(); 2179 if (widget && passWheelEventToWidget(e, widget)) 2181 2180 return true; 2182 }2183 2181 } 2184 2182 2185 2183 node = node->shadowAncestorNode(); 2186 if (node && !node->dispatchWheelEvent(e)) { 2187 e.accept(); 2184 if (node && !node->dispatchWheelEvent(e)) 2188 2185 return true; 2189 } 2190 } 2191 2192 2193 // isAccepted can't be true here, because then we would already have returned from this function. 2194 ASSERT(!e.isAccepted()); 2186 } 2187 2195 2188 2196 2189 // We do another check on the frame view because the event handler can run JS which results in the frame getting destroyed. … … 2199 2192 return false; 2200 2193 2201 bool handled = view->wheelEvent(e); 2202 ASSERT(handled == e.isAccepted()); 2203 2204 return handled; 2194 return view->wheelEvent(e); 2205 2195 } 2206 2196 … … 2252 2242 IntPoint point(gestureEvent.position().x(), gestureEvent.position().y()); 2253 2243 IntPoint globalPoint(gestureEvent.globalPosition().x(), gestureEvent.globalPosition().y()); 2254 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());2244 PlatformWheelEvent syntheticWheelEvent(point, globalPoint, gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / tickDivisor, gestureEvent.deltaY() / tickDivisor, ScrollByPixelWheelEvent, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey()); 2255 2245 handleWheelEvent(syntheticWheelEvent); 2256 2246 return true; -
trunk/Source/WebCore/page/mac/EventHandlerMac.mm
r96571 r96633 107 107 108 108 PlatformWheelEvent wheelEvent(event, page->chrome()->platformPageClient()); 109 bool handled = handleWheelEvent(wheelEvent); 110 111 ASSERT(handled == wheelEvent.isAccepted()); 112 return handled; 109 return handleWheelEvent(wheelEvent); 113 110 } 114 111 -
trunk/Source/WebCore/platform/PlatformWheelEvent.h
r96613 r96633 93 93 , m_wheelTicksY(0) 94 94 , m_granularity(ScrollByPixelWheelEvent) 95 , m_isAccepted(false)96 95 , m_shiftKey(false) 97 96 , m_ctrlKey(false) … … 108 107 } 109 108 110 PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranularity granularity, bool isAccepted, boolshiftKey, bool ctrlKey, bool altKey, bool metaKey)109 PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranularity granularity, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey) 111 110 : m_position(position) 112 111 , m_globalPosition(globalPosition) … … 116 115 , m_wheelTicksY(wheelTicksY) 117 116 , m_granularity(granularity) 118 , m_isAccepted(isAccepted)119 117 , m_shiftKey(shiftKey) 120 118 , m_ctrlKey(ctrlKey) … … 142 140 PlatformWheelEventGranularity granularity() const { return m_granularity; } 143 141 144 bool isAccepted() const { return m_isAccepted; }145 142 bool shiftKey() const { return m_shiftKey; } 146 143 bool ctrlKey() const { return m_ctrlKey; } … … 154 151 155 152 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedFromDevice; } 156 157 void accept() { m_isAccepted = true; }158 void ignore() { m_isAccepted = false; }159 153 160 154 void turnVerticalTicksIntoHorizontal() … … 215 209 float m_wheelTicksY; 216 210 PlatformWheelEventGranularity m_granularity; 217 bool m_isAccepted;218 211 bool m_shiftKey; 219 212 bool m_ctrlKey; -
trunk/Source/WebCore/platform/ScrollAnimator.cpp
r96617 r96633 100 100 || (deltaY < 0 && maxForwardScrollDelta.height() > 0) 101 101 || (deltaY > 0 && maxBackwardScrollDelta.height() > 0)) { 102 e.accept();103 102 handled = true; 104 103 if (e.granularity() == ScrollByPageWheelEvent) { … … 116 115 } 117 116 118 ASSERT(e.isAccepted() == handled);119 117 return handled; 120 118 } -
trunk/Source/WebCore/platform/chromium/PopupContainer.cpp
r95901 r96633 310 310 break; 311 311 case PlatformGestureEvent::ScrollUpdateType: { 312 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());312 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()); 313 313 handleWheelEvent(syntheticWheelEvent); 314 314 return true; -
trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm
r96561 r96633 833 833 if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseEnded) { 834 834 m_ignoreMomentumScrolls = false; 835 wheelEvent.accept();836 835 return true; 837 836 } … … 839 838 } 840 839 841 wheelEvent.accept();842 840 smoothScrollWithEvent(wheelEvent); 843 841 return true; -
trunk/Source/WebCore/platform/efl/PlatformWheelEventEfl.cpp
r96613 r96633 47 47 , m_globalPosition(IntPoint(ev->canvas.x, ev->canvas.y)) 48 48 , m_granularity(ScrollByPixelWheelEvent) 49 , m_isAccepted(false)50 49 , m_shiftKey(evas_key_modifier_is_set(ev->modifiers, "Shift")) 51 50 , m_ctrlKey(evas_key_modifier_is_set(ev->modifiers, "Control")) -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
r96561 r96633 845 845 if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseEnded) { 846 846 m_ignoreMomentumScrolls = false; 847 wheelEvent.accept();848 847 return true; 849 848 } … … 851 850 } 852 851 853 wheelEvent.accept();854 852 smoothScrollWithEvent(wheelEvent); 855 853 return true; -
trunk/Source/WebCore/platform/mac/WheelEventMac.mm
r96613 r96633 94 94 , m_globalPosition(globalPointForEvent(event)) 95 95 , m_granularity(ScrollByPixelWheelEvent) 96 , m_isAccepted(false)97 96 , m_shiftKey([event modifierFlags] & NSShiftKeyMask) 98 97 , m_ctrlKey([event modifierFlags] & NSControlKeyMask) -
trunk/Source/WebCore/platform/qt/WheelEventQt.cpp
r96613 r96633 63 63 , m_globalPosition(e->screenPos()) 64 64 , m_granularity(ScrollByPixelWheelEvent) 65 , m_isAccepted(false)66 65 , m_shiftKey(e->modifiers() & Qt::ShiftModifier) 67 66 , m_ctrlKey(e->modifiers() & Qt::ControlModifier) … … 83 82 , m_globalPosition(e->globalPos()) 84 83 , m_granularity(ScrollByPixelWheelEvent) 85 , m_isAccepted(false)86 84 , m_shiftKey(e->modifiers() & Qt::ShiftModifier) 87 85 , m_ctrlKey(e->modifiers() & Qt::ControlModifier) -
trunk/Source/WebCore/platform/win/WheelEventWin.cpp
r96613 r96633 67 67 68 68 PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, const FloatSize& delta, const FloatPoint& location) 69 : m_isAccepted(false) 70 , m_shiftKey(false) 69 : m_shiftKey(false) 71 70 , m_ctrlKey(false) 72 71 , m_altKey(false) … … 92 91 : m_position(positionForEvent(hWnd, lParam)) 93 92 , m_globalPosition(globalPositionForEvent(hWnd, lParam)) 94 , m_isAccepted(false)95 93 , m_shiftKey(wParam & MK_SHIFT) 96 94 , m_ctrlKey(wParam & MK_CONTROL) -
trunk/Source/WebCore/platform/wx/MouseWheelEventWx.cpp
r96613 r96633 45 45 , m_wheelTicksX(m_deltaX) 46 46 , m_wheelTicksY(m_deltaY) 47 , m_isAccepted(false)48 47 , m_directionInvertedFromDevice(false) 49 48 { -
trunk/Source/WebKit/chromium/ChangeLog
r96590 r96633 1 2011-10-04 Anders Carlsson <andersca@apple.com> 2 3 Remove PlatformWheelEvent::m_isAccepted 4 https://bugs.webkit.org/show_bug.cgi?id=69357 5 6 Reviewed by Darin Adler. 7 8 * src/WebInputEventConversion.cpp: 9 (WebKit::PlatformWheelEventBuilder::PlatformWheelEventBuilder): 10 m_isAccepted has been removed. 11 12 * src/WebScrollbarImpl.cpp: 13 (WebKit::WebScrollbarImpl::onMouseWheel): 14 Just return the value of handleWheelEvent. 15 1 16 2011-10-04 Yury Semikhatsky <yurys@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp
r95901 r96633 99 99 m_wheelTicksX = e.wheelTicksX; 100 100 m_wheelTicksY = e.wheelTicksY; 101 m_isAccepted = false;102 101 m_granularity = e.scrollByPage ? 103 102 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; -
trunk/Source/WebKit/chromium/src/WebScrollbarImpl.cpp
r95901 r96633 250 250 WebMouseWheelEvent mousewheel = *static_cast<const WebMouseWheelEvent*>(&event); 251 251 PlatformWheelEventBuilder platformEvent(m_scrollbar.get(), mousewheel); 252 m_group->handleWheelEvent(platformEvent); 253 return platformEvent.isAccepted(); 252 return m_group->handleWheelEvent(platformEvent); 254 253 } 255 254
Note: See TracChangeset
for help on using the changeset viewer.