Changeset 85826 in webkit


Ignore:
Timestamp:
May 4, 2011 8:07:02 PM (13 years ago)
Author:
rniwa@webkit.org
Message:

2011-05-04 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Eric Seidel.

Make more member functions in EventHandler private
https://bugs.webkit.org/show_bug.cgi?id=60200

Reduced the number of public member functions in EventHandler.

  • WebCore.exp.in:
  • page/EventHandler.cpp: (WebCore::EventHandler::handleAutoscroll): (WebCore::EventHandler::autoscrollTimerFired): (WebCore::EventHandler::stopAutoscrollTimer): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
  • page/EventHandler.h: (WebCore::EventHandler::mouseDownMayStartSelect):
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85825 r85826  
     12011-05-04  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Make more member functions in EventHandler private
     6        https://bugs.webkit.org/show_bug.cgi?id=60200
     7
     8        Reduced the number of public member functions in EventHandler.
     9
     10        * WebCore.exp.in:
     11        * page/EventHandler.cpp:
     12        (WebCore::EventHandler::handleAutoscroll):
     13        (WebCore::EventHandler::autoscrollTimerFired):
     14        (WebCore::EventHandler::stopAutoscrollTimer):
     15        (WebCore::EventHandler::handleMousePressEvent):
     16        (WebCore::EventHandler::handleMouseMoveEvent):
     17        (WebCore::EventHandler::keyEvent):
     18        (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
     19        * page/EventHandler.h:
     20        (WebCore::EventHandler::mouseDownMayStartSelect):
     21
    1222011-05-04  James Robinson  <jamesr@chromium.org>
    223
  • trunk/Source/WebCore/WebCore.exp.in

    r85549 r85826  
    233233__ZN7WebCore12EventHandler14scrollOverflowENS_15ScrollDirectionENS_17ScrollGranularityEPNS_4NodeE
    234234__ZN7WebCore12EventHandler15handleAccessKeyERKNS_21PlatformKeyboardEventE
    235 __ZN7WebCore12EventHandler15sendScrollEventEv
    236235__ZN7WebCore12EventHandler16handleWheelEventERNS_18PlatformWheelEventE
    237236__ZN7WebCore12EventHandler17scrollRecursivelyENS_15ScrollDirectionENS_17ScrollGranularityEPNS_4NodeE
     
    240239__ZN7WebCore12EventHandler23handleMouseReleaseEventERKNS_18PlatformMouseEventE
    241240__ZN7WebCore12EventHandler24logicalScrollRecursivelyENS_22ScrollLogicalDirectionENS_17ScrollGranularityEPNS_4NodeE
    242 __ZN7WebCore12EventHandler27capsLockStateMayHaveChangedEv
    243241__ZN7WebCore12EventHandler7mouseUpEP7NSEvent
    244242__ZN7WebCore12EventHandler8keyEventEP7NSEvent
  • trunk/Source/WebCore/page/EventHandler.cpp

    r84921 r85826  
    775775            Frame* mainFrame = page->mainFrame();
    776776            if (m_frame != mainFrame)
    777                 mainFrame->eventHandler()->setPanScrollInProgress(true);
     777                mainFrame->eventHandler()->m_panScrollInProgress = true;
    778778        }
    779779    }
     
    800800        // we verify that the main frame hasn't received the order to stop the panScroll
    801801        if (Page* page = m_frame->page()) {
    802             if (!page->mainFrame()->eventHandler()->panScrollInProgress()) {
     802            if (!page->mainFrame()->eventHandler()->m_panScrollInProgress) {
    803803                stopAutoscrollTimer();
    804804                return;
     
    10051005        Frame* mainFrame = page->mainFrame();
    10061006        if (m_frame != mainFrame)
    1007             mainFrame->eventHandler()->setPanScrollInProgress(false);
     1007            mainFrame->eventHandler()->m_panScrollInProgress = false;
    10081008    }
    10091009
     
    13941394    // We store whether pan scrolling is in progress before calling stopAutoscrollTimer()
    13951395    // because it will set m_panScrollInProgress to false on return.
    1396     bool isPanScrollInProgress = m_frame->page() && m_frame->page()->mainFrame()->eventHandler()->panScrollInProgress();
     1396    bool isPanScrollInProgress = m_frame->page() && m_frame->page()->mainFrame()->eventHandler()->m_panScrollInProgress;
    13971397    if (isPanScrollInProgress || m_autoscrollInProgress)
    13981398        stopAutoscrollTimer();
     
    16271627            scrollbar->mouseMoved(mouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
    16281628        if (Page* page = m_frame->page()) {
    1629             if ((!m_resizeLayer || !m_resizeLayer->inResizeMode()) && !page->mainFrame()->eventHandler()->panScrollInProgress()) {
     1629            if ((!m_resizeLayer || !m_resizeLayer->inResizeMode()) && !page->mainFrame()->eventHandler()->m_panScrollInProgress) {
    16301630                // Plugins set cursor on their own. The only case WebKit intervenes is resetting cursor to arrow on mouse enter,
    16311631                // in case the particular plugin doesn't manipulate cursor at all. Thus,  even a CSS cursor set on body has no
     
    24292429#if ENABLE(PAN_SCROLLING)
    24302430    if (Page* page = m_frame->page()) {
    2431         if (page->mainFrame()->eventHandler()->panScrollInProgress() || m_autoscrollInProgress) {
     2431        if (page->mainFrame()->eventHandler()->m_panScrollInProgress || m_autoscrollInProgress) {
    24322432            // If a key is pressed while the autoscroll/panScroll is in progress then we want to stop
    24332433            if (initialKeyEvent.type() == PlatformKeyboardEvent::KeyDown || initialKeyEvent.type() == PlatformKeyboardEvent::RawKeyDown)
     
    28422842}
    28432843
    2844 static bool eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event)
     2844bool EventHandler::eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event)
    28452845{
    28462846#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(HAIKU) || PLATFORM(EFL)
  • trunk/Source/WebCore/page/EventHandler.h

    r85428 r85826  
    107107
    108108    void startPanScrolling(RenderObject*);
    109     bool panScrollInProgress() { return m_panScrollInProgress; }
    110     void setPanScrollInProgress(bool inProgress) { m_panScrollInProgress = inProgress; }
    111109
    112110    void stopAutoscrollTimer(bool rendererIsBeingDestroyed = false);
     
    141139    IntPoint currentMousePosition() const;
    142140
    143     void setIgnoreWheelEvents(bool);
    144 
    145141    static Frame* subframeForTargetNode(Node*);
    146142    static Frame* subframeForHitTestResult(const MouseEventWithHitTestResults&);
    147143
    148144    bool scrollOverflow(ScrollDirection, ScrollGranularity, Node* startingNode = 0);
    149     bool logicalScrollOverflow(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0);
    150 
    151145    bool scrollRecursively(ScrollDirection, ScrollGranularity, Node* startingNode = 0);
    152146    bool logicalScrollRecursively(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0);
     
    156150#endif
    157151
    158     bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const;
    159 
    160152    bool tabsToLinks(KeyboardEvent*) const;
    161153    bool tabsToAllFormControls(KeyboardEvent*) const;
    162 
    163     bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; }
    164154
    165155    bool mouseMoved(const PlatformMouseEvent&);
     
    202192    void focusDocumentView();
    203193
    204     void capsLockStateMayHaveChanged();
    205    
    206     void sendResizeEvent();
    207     void sendScrollEvent();
    208    
     194    void capsLockStateMayHaveChanged(); // Only called by SelectionController
     195   
     196    void sendResizeEvent(); // Only called in FrameView
     197    void sendScrollEvent(); // Ditto
     198
    209199#if PLATFORM(MAC) && defined(__OBJC__)
    210200    void mouseDown(NSEvent *);
     
    225215    bool handleTouchEvent(const PlatformTouchEvent&);
    226216#endif
    227 
    228     static bool isKeyboardOptionTab(KeyboardEvent*);
    229217
    230218private:
     
    293281    void setAutoscrollRenderer(RenderObject*);
    294282    void autoscrollTimerFired(Timer<EventHandler>*);
     283    bool logicalScrollOverflow(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0);
     284   
     285    bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const;
     286    bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; }
     287
     288    static bool isKeyboardOptionTab(KeyboardEvent*);
     289    static bool eventInvertsTabsToLinksClientCallResult(KeyboardEvent*);
    295290
    296291    void fakeMouseMoveEventTimerFired(Timer<EventHandler>*);
Note: See TracChangeset for help on using the changeset viewer.