Changeset 85826 in webkit
- Timestamp:
- May 4, 2011 8:07:02 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r85825 r85826 1 2011-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 1 22 2011-05-04 James Robinson <jamesr@chromium.org> 2 23 -
trunk/Source/WebCore/WebCore.exp.in
r85549 r85826 233 233 __ZN7WebCore12EventHandler14scrollOverflowENS_15ScrollDirectionENS_17ScrollGranularityEPNS_4NodeE 234 234 __ZN7WebCore12EventHandler15handleAccessKeyERKNS_21PlatformKeyboardEventE 235 __ZN7WebCore12EventHandler15sendScrollEventEv236 235 __ZN7WebCore12EventHandler16handleWheelEventERNS_18PlatformWheelEventE 237 236 __ZN7WebCore12EventHandler17scrollRecursivelyENS_15ScrollDirectionENS_17ScrollGranularityEPNS_4NodeE … … 240 239 __ZN7WebCore12EventHandler23handleMouseReleaseEventERKNS_18PlatformMouseEventE 241 240 __ZN7WebCore12EventHandler24logicalScrollRecursivelyENS_22ScrollLogicalDirectionENS_17ScrollGranularityEPNS_4NodeE 242 __ZN7WebCore12EventHandler27capsLockStateMayHaveChangedEv243 241 __ZN7WebCore12EventHandler7mouseUpEP7NSEvent 244 242 __ZN7WebCore12EventHandler8keyEventEP7NSEvent -
trunk/Source/WebCore/page/EventHandler.cpp
r84921 r85826 775 775 Frame* mainFrame = page->mainFrame(); 776 776 if (m_frame != mainFrame) 777 mainFrame->eventHandler()-> setPanScrollInProgress(true);777 mainFrame->eventHandler()->m_panScrollInProgress = true; 778 778 } 779 779 } … … 800 800 // we verify that the main frame hasn't received the order to stop the panScroll 801 801 if (Page* page = m_frame->page()) { 802 if (!page->mainFrame()->eventHandler()-> panScrollInProgress()) {802 if (!page->mainFrame()->eventHandler()->m_panScrollInProgress) { 803 803 stopAutoscrollTimer(); 804 804 return; … … 1005 1005 Frame* mainFrame = page->mainFrame(); 1006 1006 if (m_frame != mainFrame) 1007 mainFrame->eventHandler()-> setPanScrollInProgress(false);1007 mainFrame->eventHandler()->m_panScrollInProgress = false; 1008 1008 } 1009 1009 … … 1394 1394 // We store whether pan scrolling is in progress before calling stopAutoscrollTimer() 1395 1395 // 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; 1397 1397 if (isPanScrollInProgress || m_autoscrollInProgress) 1398 1398 stopAutoscrollTimer(); … … 1627 1627 scrollbar->mouseMoved(mouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering. 1628 1628 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) { 1630 1630 // Plugins set cursor on their own. The only case WebKit intervenes is resetting cursor to arrow on mouse enter, 1631 1631 // in case the particular plugin doesn't manipulate cursor at all. Thus, even a CSS cursor set on body has no … … 2429 2429 #if ENABLE(PAN_SCROLLING) 2430 2430 if (Page* page = m_frame->page()) { 2431 if (page->mainFrame()->eventHandler()-> panScrollInProgress()|| m_autoscrollInProgress) {2431 if (page->mainFrame()->eventHandler()->m_panScrollInProgress || m_autoscrollInProgress) { 2432 2432 // If a key is pressed while the autoscroll/panScroll is in progress then we want to stop 2433 2433 if (initialKeyEvent.type() == PlatformKeyboardEvent::KeyDown || initialKeyEvent.type() == PlatformKeyboardEvent::RawKeyDown) … … 2842 2842 } 2843 2843 2844 static booleventInvertsTabsToLinksClientCallResult(KeyboardEvent* event)2844 bool EventHandler::eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event) 2845 2845 { 2846 2846 #if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(HAIKU) || PLATFORM(EFL) -
trunk/Source/WebCore/page/EventHandler.h
r85428 r85826 107 107 108 108 void startPanScrolling(RenderObject*); 109 bool panScrollInProgress() { return m_panScrollInProgress; }110 void setPanScrollInProgress(bool inProgress) { m_panScrollInProgress = inProgress; }111 109 112 110 void stopAutoscrollTimer(bool rendererIsBeingDestroyed = false); … … 141 139 IntPoint currentMousePosition() const; 142 140 143 void setIgnoreWheelEvents(bool);144 145 141 static Frame* subframeForTargetNode(Node*); 146 142 static Frame* subframeForHitTestResult(const MouseEventWithHitTestResults&); 147 143 148 144 bool scrollOverflow(ScrollDirection, ScrollGranularity, Node* startingNode = 0); 149 bool logicalScrollOverflow(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0);150 151 145 bool scrollRecursively(ScrollDirection, ScrollGranularity, Node* startingNode = 0); 152 146 bool logicalScrollRecursively(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0); … … 156 150 #endif 157 151 158 bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const;159 160 152 bool tabsToLinks(KeyboardEvent*) const; 161 153 bool tabsToAllFormControls(KeyboardEvent*) const; 162 163 bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; }164 154 165 155 bool mouseMoved(const PlatformMouseEvent&); … … 202 192 void focusDocumentView(); 203 193 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 209 199 #if PLATFORM(MAC) && defined(__OBJC__) 210 200 void mouseDown(NSEvent *); … … 225 215 bool handleTouchEvent(const PlatformTouchEvent&); 226 216 #endif 227 228 static bool isKeyboardOptionTab(KeyboardEvent*);229 217 230 218 private: … … 293 281 void setAutoscrollRenderer(RenderObject*); 294 282 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*); 295 290 296 291 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*);
Note: See TracChangeset
for help on using the changeset viewer.