Changeset 96633 in webkit


Ignore:
Timestamp:
Oct 4, 2011 1:11:04 PM (13 years ago)
Author:
andersca@apple.com
Message:

Remove PlatformWheelEvent::m_isAccepted
https://bugs.webkit.org/show_bug.cgi?id=69357

Reviewed by Darin Adler.

../WebCore:

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):

../WebKit/chromium:

  • src/WebInputEventConversion.cpp:

(WebKit::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
m_isAccepted has been removed.

  • src/WebScrollbarImpl.cpp:

(WebKit::WebScrollbarImpl::onMouseWheel):
Just return the value of handleWheelEvent.

Location:
trunk/Source
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r96632 r96633  
     12011-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
    1362011-09-21  Cris Neckar  <cdn@chromium.org>
    237
  • trunk/Source/WebCore/page/EventHandler.cpp

    r96617 r96633  
    21772177        if (isOverWidget && target && target->isWidget()) {
    21782178            Widget* widget = toRenderWidget(target)->widget();
    2179             if (widget && passWheelEventToWidget(e, widget)) {
    2180                 e.accept();
     2179            if (widget && passWheelEventToWidget(e, widget))
    21812180                return true;
    2182             }
    21832181        }
    21842182
    21852183        node = node->shadowAncestorNode();
    2186         if (node && !node->dispatchWheelEvent(e)) {
    2187             e.accept();
     2184        if (node && !node->dispatchWheelEvent(e))
    21882185            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
    21952188
    21962189    // We do another check on the frame view because the event handler can run JS which results in the frame getting destroyed.
     
    21992192        return false;
    22002193   
    2201     bool handled = view->wheelEvent(e);
    2202     ASSERT(handled == e.isAccepted());
    2203 
    2204     return handled;
     2194    return view->wheelEvent(e);
    22052195}
    22062196   
     
    22522242        IntPoint point(gestureEvent.position().x(), gestureEvent.position().y());
    22532243        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());
    22552245        handleWheelEvent(syntheticWheelEvent);
    22562246        return true;
  • trunk/Source/WebCore/page/mac/EventHandlerMac.mm

    r96571 r96633  
    107107
    108108    PlatformWheelEvent wheelEvent(event, page->chrome()->platformPageClient());
    109     bool handled = handleWheelEvent(wheelEvent);
    110 
    111     ASSERT(handled == wheelEvent.isAccepted());
    112     return handled;
     109    return handleWheelEvent(wheelEvent);
    113110}
    114111
  • trunk/Source/WebCore/platform/PlatformWheelEvent.h

    r96613 r96633  
    9393            , m_wheelTicksY(0)
    9494            , m_granularity(ScrollByPixelWheelEvent)
    95             , m_isAccepted(false)
    9695            , m_shiftKey(false)
    9796            , m_ctrlKey(false)
     
    108107        }
    109108
    110         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)
     109        PlatformWheelEvent(IntPoint position, IntPoint globalPosition, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, PlatformWheelEventGranularity granularity, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
    111110            : m_position(position)
    112111            , m_globalPosition(globalPosition)
     
    116115            , m_wheelTicksY(wheelTicksY)
    117116            , m_granularity(granularity)
    118             , m_isAccepted(isAccepted)
    119117            , m_shiftKey(shiftKey)
    120118            , m_ctrlKey(ctrlKey)
     
    142140        PlatformWheelEventGranularity granularity() const { return m_granularity; }
    143141
    144         bool isAccepted() const { return m_isAccepted; }
    145142        bool shiftKey() const { return m_shiftKey; }
    146143        bool ctrlKey() const { return m_ctrlKey; }
     
    154151
    155152        bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedFromDevice; }
    156 
    157         void accept() { m_isAccepted = true; }
    158         void ignore() { m_isAccepted = false; }
    159153
    160154        void turnVerticalTicksIntoHorizontal()
     
    215209        float m_wheelTicksY;
    216210        PlatformWheelEventGranularity m_granularity;
    217         bool m_isAccepted;
    218211        bool m_shiftKey;
    219212        bool m_ctrlKey;
  • trunk/Source/WebCore/platform/ScrollAnimator.cpp

    r96617 r96633  
    100100        || (deltaY < 0 && maxForwardScrollDelta.height() > 0)
    101101        || (deltaY > 0 && maxBackwardScrollDelta.height() > 0)) {
    102         e.accept();
    103102        handled = true;
    104103        if (e.granularity() == ScrollByPageWheelEvent) {
     
    116115    }
    117116
    118     ASSERT(e.isAccepted() == handled);
    119117    return handled;
    120118}
  • trunk/Source/WebCore/platform/chromium/PopupContainer.cpp

    r95901 r96633  
    310310        break;
    311311    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());
    313313        handleWheelEvent(syntheticWheelEvent);
    314314        return true;
  • trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm

    r96561 r96633  
    833833        if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseEnded) {
    834834            m_ignoreMomentumScrolls = false;
    835             wheelEvent.accept();
    836835            return true;
    837836        }
     
    839838    }
    840839
    841     wheelEvent.accept();
    842840    smoothScrollWithEvent(wheelEvent);
    843841    return true;
  • trunk/Source/WebCore/platform/efl/PlatformWheelEventEfl.cpp

    r96613 r96633  
    4747    , m_globalPosition(IntPoint(ev->canvas.x, ev->canvas.y))
    4848    , m_granularity(ScrollByPixelWheelEvent)
    49     , m_isAccepted(false)
    5049    , m_shiftKey(evas_key_modifier_is_set(ev->modifiers, "Shift"))
    5150    , m_ctrlKey(evas_key_modifier_is_set(ev->modifiers, "Control"))
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm

    r96561 r96633  
    845845        if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseEnded) {
    846846            m_ignoreMomentumScrolls = false;
    847             wheelEvent.accept();
    848847            return true;
    849848        }
     
    851850    }
    852851
    853     wheelEvent.accept();
    854852    smoothScrollWithEvent(wheelEvent);
    855853    return true;
  • trunk/Source/WebCore/platform/mac/WheelEventMac.mm

    r96613 r96633  
    9494    , m_globalPosition(globalPointForEvent(event))
    9595    , m_granularity(ScrollByPixelWheelEvent)
    96     , m_isAccepted(false)
    9796    , m_shiftKey([event modifierFlags] & NSShiftKeyMask)
    9897    , m_ctrlKey([event modifierFlags] & NSControlKeyMask)
  • trunk/Source/WebCore/platform/qt/WheelEventQt.cpp

    r96613 r96633  
    6363    , m_globalPosition(e->screenPos())
    6464    , m_granularity(ScrollByPixelWheelEvent)
    65     , m_isAccepted(false)
    6665    , m_shiftKey(e->modifiers() & Qt::ShiftModifier)
    6766    , m_ctrlKey(e->modifiers() & Qt::ControlModifier)
     
    8382    , m_globalPosition(e->globalPos())
    8483    , m_granularity(ScrollByPixelWheelEvent)
    85     , m_isAccepted(false)
    8684    , m_shiftKey(e->modifiers() & Qt::ShiftModifier)
    8785    , m_ctrlKey(e->modifiers() & Qt::ControlModifier)
  • trunk/Source/WebCore/platform/win/WheelEventWin.cpp

    r96613 r96633  
    6767
    6868PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, const FloatSize& delta, const FloatPoint& location)
    69     : m_isAccepted(false)
    70     , m_shiftKey(false)
     69    : m_shiftKey(false)
    7170    , m_ctrlKey(false)
    7271    , m_altKey(false)
     
    9291    : m_position(positionForEvent(hWnd, lParam))
    9392    , m_globalPosition(globalPositionForEvent(hWnd, lParam))
    94     , m_isAccepted(false)
    9593    , m_shiftKey(wParam & MK_SHIFT)
    9694    , m_ctrlKey(wParam & MK_CONTROL)
  • trunk/Source/WebCore/platform/wx/MouseWheelEventWx.cpp

    r96613 r96633  
    4545    , m_wheelTicksX(m_deltaX)
    4646    , m_wheelTicksY(m_deltaY)
    47     , m_isAccepted(false)
    4847    , m_directionInvertedFromDevice(false)
    4948{
  • trunk/Source/WebKit/chromium/ChangeLog

    r96590 r96633  
     12011-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
    1162011-10-04  Yury Semikhatsky  <yurys@chromium.org>
    217
  • trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp

    r95901 r96633  
    9999    m_wheelTicksX = e.wheelTicksX;
    100100    m_wheelTicksY = e.wheelTicksY;
    101     m_isAccepted = false;
    102101    m_granularity = e.scrollByPage ?
    103102        ScrollByPageWheelEvent : ScrollByPixelWheelEvent;
  • trunk/Source/WebKit/chromium/src/WebScrollbarImpl.cpp

    r95901 r96633  
    250250    WebMouseWheelEvent mousewheel = *static_cast<const WebMouseWheelEvent*>(&event);
    251251    PlatformWheelEventBuilder platformEvent(m_scrollbar.get(), mousewheel);
    252     m_group->handleWheelEvent(platformEvent);
    253     return platformEvent.isAccepted();
     252    return m_group->handleWheelEvent(platformEvent);
    254253}
    255254
Note: See TracChangeset for help on using the changeset viewer.