Changeset 191080 in webkit
- Timestamp:
- Oct 14, 2015 6:21:19 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r191077 r191080 1 2015-10-14 Tim Horton <timothy_horton@apple.com> 2 3 Move some EventHandler initialization to the header 4 https://bugs.webkit.org/show_bug.cgi?id=150139 5 6 Reviewed by Andreas Kling. 7 8 No new tests, just cleanup. 9 10 * page/EventHandler.cpp: 11 (WebCore::EventHandler::EventHandler): Deleted. 12 * page/EventHandler.h: 13 Also found one member which was unused, and a few that were uninitialized. 14 It's likely the uninitialized ones didn't actually cause any trouble because 15 they are reset in lots of places, but this seems better. 16 1 17 2015-10-14 Alex Christensen <achristensen@webkit.org> 2 18 -
trunk/Source/WebCore/page/EventHandler.cpp
r189239 r191080 374 374 EventHandler::EventHandler(Frame& frame) 375 375 : m_frame(frame) 376 , m_mousePressed(false)377 , m_capturesDragging(false)378 , m_mouseDownMayStartSelect(false)379 #if ENABLE(DRAG_SUPPORT)380 , m_mouseDownMayStartDrag(false)381 , m_dragMayStartSelectionInstead(false)382 #endif383 , m_mouseDownWasSingleClickInSelection(false)384 , m_selectionInitiationState(HaveNotStartedSelection)385 376 , m_hoverTimer(*this, &EventHandler::hoverTimerFired) 386 377 #if ENABLE(CURSOR_SUPPORT) … … 388 379 #endif 389 380 , m_longMousePressTimer(*this, &EventHandler::recognizeLongMousePress) 390 , m_didRecognizeLongMousePress(false)391 381 , m_autoscrollController(std::make_unique<AutoscrollController>()) 392 , m_mouseDownMayStartAutoscroll(false)393 , m_mouseDownWasInSubframe(false)394 382 #if !ENABLE(IOS_TOUCH_EVENTS) 395 383 , m_fakeMouseMoveEventTimer(*this, &EventHandler::fakeMouseMoveEventTimerFired) 396 384 #endif 397 , m_svgPan(false)398 , m_resizeLayer(nullptr)399 , m_eventHandlerWillResetCapturingMouseEventsElement(false)400 , m_clickCount(0)401 #if ENABLE(IOS_GESTURE_EVENTS)402 , m_gestureInitialDiameter(GestureUnknown)403 , m_gestureLastDiameter(GestureUnknown)404 , m_gestureInitialRotation(GestureUnknown)405 , m_gestureLastRotation(GestureUnknown)406 #endif407 #if ENABLE(IOS_TOUCH_EVENTS)408 , m_firstTouchID(InvalidTouchIdentifier)409 #endif410 , m_mousePositionIsUnknown(true)411 , m_mouseDownTimestamp(0)412 #if PLATFORM(COCOA)413 , m_mouseDownView(nil)414 , m_sendingEventToSubview(false)415 #if !PLATFORM(IOS)416 , m_activationEventNumber(-1)417 #endif // !PLATFORM(IOS)418 #endif419 #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)420 , m_originatingTouchPointTargetKey(0)421 , m_touchPressed(false)422 #endif423 , m_maxMouseMovedDuration(0)424 , m_baseEventType(PlatformEvent::NoType)425 , m_didStartDrag(false)426 , m_didLongPressInvokeContextMenu(false)427 , m_isHandlingWheelEvent(false)428 385 #if ENABLE(CURSOR_VISIBILITY) 429 386 , m_autoHideCursorTimer(*this, &EventHandler::autoHideCursorTimerFired) 430 387 #endif 431 , m_immediateActionStage(ImmediateActionStage::None)432 388 { 433 389 } -
trunk/Source/WebCore/page/EventHandler.h
r189168 r191080 45 45 46 46 #if PLATFORM(IOS) 47 OBJC_CLASS WebEvent; 48 OBJC_CLASS WAKView; 47 49 #ifdef __OBJC__ 48 @class WebEvent;49 @class WAKView;50 50 #include "WAKAppKitStubs.h" 51 #else52 class WebEvent;53 51 #endif 54 52 #endif // PLATFORM(IOS) 55 53 56 #if PLATFORM(COCOA) && !defined(__OBJC__)57 classNSView;54 #if PLATFORM(COCOA) 55 OBJC_CLASS NSView; 58 56 #endif 59 57 … … 262 260 void focusDocumentView(); 263 261 264 WEBCORE_EXPORT void sendScrollEvent(); // Ditto262 WEBCORE_EXPORT void sendScrollEvent(); 265 263 266 264 #if PLATFORM(COCOA) && defined(__OBJC__) … … 471 469 Frame& m_frame; 472 470 473 bool m_mousePressed ;474 bool m_capturesDragging ;471 bool m_mousePressed { false }; 472 bool m_capturesDragging { false }; 475 473 RefPtr<Node> m_mousePressNode; 476 474 477 bool m_mouseDownMayStartSelect ;478 #if ENABLE(DRAG_SUPPORT) 479 bool m_mouseDownMayStartDrag ;480 bool m_dragMayStartSelectionInstead ;481 #endif 482 bool m_mouseDownWasSingleClickInSelection ;475 bool m_mouseDownMayStartSelect { false }; 476 #if ENABLE(DRAG_SUPPORT) 477 bool m_mouseDownMayStartDrag { false }; 478 bool m_dragMayStartSelectionInstead { false }; 479 #endif 480 bool m_mouseDownWasSingleClickInSelection { false }; 483 481 enum SelectionInitiationState { HaveNotStartedSelection, PlacedCaret, ExtendedSelection }; 484 SelectionInitiationState m_selectionInitiationState ;482 SelectionInitiationState m_selectionInitiationState { HaveNotStartedSelection }; 485 483 486 484 #if ENABLE(DRAG_SUPPORT) … … 488 486 #endif 489 487 490 bool m_panScrollButtonPressed ;488 bool m_panScrollButtonPressed { false }; 491 489 492 490 Timer m_hoverTimer; … … 496 494 497 495 Timer m_longMousePressTimer; 498 bool m_didRecognizeLongMousePress ;496 bool m_didRecognizeLongMousePress { false }; 499 497 500 498 std::unique_ptr<AutoscrollController> m_autoscrollController; 501 bool m_mouseDownMayStartAutoscroll ;502 bool m_mouseDownWasInSubframe ;499 bool m_mouseDownMayStartAutoscroll { false }; 500 bool m_mouseDownWasInSubframe { false }; 503 501 504 502 #if !ENABLE(IOS_TOUCH_EVENTS) … … 506 504 #endif 507 505 508 bool m_svgPan ;509 510 RenderLayer* m_resizeLayer ;506 bool m_svgPan { false }; 507 508 RenderLayer* m_resizeLayer { nullptr }; 511 509 512 510 RefPtr<Element> m_capturingMouseEventsElement; 513 bool m_eventHandlerWillResetCapturingMouseEventsElement ;511 bool m_eventHandlerWillResetCapturingMouseEventsElement { false }; 514 512 515 513 RefPtr<Element> m_elementUnderMouse; … … 519 517 Cursor m_currentMouseCursor; 520 518 521 int m_clickCount ;519 int m_clickCount { 0 }; 522 520 RefPtr<Node> m_clickNode; 523 521 524 522 #if ENABLE(IOS_GESTURE_EVENTS) 525 float m_gestureInitialDiameter; 526 float m_gestureLastDiameter; 527 float m_gestureInitialRotation; 528 float m_gestureLastRotation; 523 float m_gestureInitialDiameter { GestureUnknown }; 524 float m_gestureInitialRotation { GestureUnknown }; 525 float m_gestureLastDiameter { GestureUnknown }; 526 float m_gestureLastRotation { GestureUnknown }; 527 EventTargetSet m_gestureTargets; 529 528 #endif 530 529 531 530 #if ENABLE(IOS_TOUCH_EVENTS) 532 unsigned m_firstTouchID ;531 unsigned m_firstTouchID { InvalidTouchIdentifier }; 533 532 534 533 TouchArray m_touches; 535 EventTargetSet m_gestureTargets;536 534 RefPtr<Frame> m_touchEventTargetSubframe; 537 535 #endif … … 539 537 #if ENABLE(DRAG_SUPPORT) 540 538 RefPtr<Element> m_dragTarget; 541 bool m_shouldOnlyFireDragOverEvent ;539 bool m_shouldOnlyFireDragOverEvent { false }; 542 540 #endif 543 541 … … 546 544 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeLayer. 547 545 548 bool m_mousePositionIsUnknown ;546 bool m_mousePositionIsUnknown { true }; 549 547 IntPoint m_lastKnownMousePosition; 550 548 IntPoint m_lastKnownMouseGlobalPosition; 551 549 IntPoint m_mouseDownPos; // In our view's coords. 552 double m_mouseDownTimestamp ;550 double m_mouseDownTimestamp { 0 }; 553 551 PlatformMouseEvent m_mouseDown; 554 552 555 553 #if PLATFORM(COCOA) 556 NSView *m_mouseDownView; 557 bool m_sendingEventToSubview; 558 bool m_startedGestureAtScrollLimit; 554 NSView *m_mouseDownView { nullptr }; 555 bool m_sendingEventToSubview { false }; 559 556 #if !PLATFORM(IOS) 560 int m_activationEventNumber ;557 int m_activationEventNumber { -1 }; 561 558 #endif 562 559 #endif … … 565 562 TouchTargetMap m_originatingTouchPointTargets; 566 563 RefPtr<Document> m_originatingTouchPointDocument; 567 unsigned m_originatingTouchPointTargetKey ;568 bool m_touchPressed ;569 #endif 570 571 double m_maxMouseMovedDuration ;572 PlatformEvent::Type m_baseEventType ;573 bool m_didStartDrag ;574 bool m_didLongPressInvokeContextMenu ;575 bool m_isHandlingWheelEvent ;564 unsigned m_originatingTouchPointTargetKey { 0 }; 565 bool m_touchPressed { false }; 566 #endif 567 568 double m_maxMouseMovedDuration { 0 }; 569 PlatformEvent::Type m_baseEventType { PlatformEvent::NoType }; 570 bool m_didStartDrag { false }; 571 bool m_didLongPressInvokeContextMenu { false }; 572 bool m_isHandlingWheelEvent { false }; 576 573 577 574 #if ENABLE(CURSOR_VISIBILITY) … … 579 576 #endif 580 577 581 ImmediateActionStage m_immediateActionStage ;578 ImmediateActionStage m_immediateActionStage { ImmediateActionStage::None }; 582 579 }; 583 580
Note: See TracChangeset
for help on using the changeset viewer.