Changeset 236982 in webkit


Ignore:
Timestamp:
Oct 9, 2018 2:30:53 PM (6 years ago)
Author:
dbates@webkit.org
Message:

Cleanup WebEvent.mm
https://bugs.webkit.org/show_bug.cgi?id=190391

Reviewed by Wenson Hsieh.

Unindent case statements in switch blocks.

  • platform/ios/WebEvent.mm:

(-[WebEvent _typeDescription]):
(-[WebEvent _modiferFlagsDescription]):
(-[WebEvent _touchPhaseDescription:]):
(-[WebEvent _eventDescription]):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r236979 r236982  
     12018-10-09  Daniel Bates  <dabates@apple.com>
     2
     3        Cleanup WebEvent.mm
     4        https://bugs.webkit.org/show_bug.cgi?id=190391
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Unindent case statements in switch blocks.
     9
     10        * platform/ios/WebEvent.mm:
     11        (-[WebEvent _typeDescription]):
     12        (-[WebEvent _modiferFlagsDescription]):
     13        (-[WebEvent _touchPhaseDescription:]):
     14        (-[WebEvent _eventDescription]):
     15
    1162018-10-09  Oriol Brufau  <obrufau@igalia.com>
    217
  • trunk/Source/WebCore/platform/ios/WebEvent.mm

    r236678 r236982  
    255255{
    256256    switch (_type) {
    257         case WebEventMouseDown:
    258             return @"WebEventMouseDown";
    259         case WebEventMouseUp:
    260             return @"WebEventMouseUp";
    261         case WebEventMouseMoved:
    262             return @"WebEventMouseMoved";
    263         case WebEventScrollWheel:
    264             return @"WebEventScrollWheel";
    265         case WebEventKeyDown:
    266             return @"WebEventKeyDown";
    267         case WebEventKeyUp:
    268             return @"WebEventKeyUp";
    269         case WebEventTouchBegin:
    270             return @"WebEventTouchBegin";
    271         case WebEventTouchChange:
    272             return @"WebEventTouchChange";
    273         case WebEventTouchEnd:
    274             return @"WebEventTouchEnd";
    275         case WebEventTouchCancel:
    276             return @"WebEventTouchCancel";
    277         default:
    278             ASSERT_NOT_REACHED();
     257    case WebEventMouseDown:
     258        return @"WebEventMouseDown";
     259    case WebEventMouseUp:
     260        return @"WebEventMouseUp";
     261    case WebEventMouseMoved:
     262        return @"WebEventMouseMoved";
     263    case WebEventScrollWheel:
     264        return @"WebEventScrollWheel";
     265    case WebEventKeyDown:
     266        return @"WebEventKeyDown";
     267    case WebEventKeyUp:
     268        return @"WebEventKeyUp";
     269    case WebEventTouchBegin:
     270        return @"WebEventTouchBegin";
     271    case WebEventTouchChange:
     272        return @"WebEventTouchChange";
     273    case WebEventTouchEnd:
     274        return @"WebEventTouchEnd";
     275    case WebEventTouchCancel:
     276        return @"WebEventTouchCancel";
     277    default:
     278        ASSERT_NOT_REACHED();
    279279    }
    280280    return @"Unknown";
     
    284284{
    285285    switch (_modifierFlags) {
    286         case WebEventMouseDown:
    287             return @"WebEventMouseDown";
    288         case WebEventMouseUp:
    289             return @"WebEventMouseUp";
    290         case WebEventMouseMoved:
    291             return @"WebEventMouseMoved";
    292         case WebEventScrollWheel:
    293             return @"WebEventScrollWheel";
    294         case WebEventKeyDown:
    295             return @"WebEventKeyDown";
    296         case WebEventKeyUp:
    297             return @"WebEventKeyUp";
    298         case WebEventTouchBegin:
    299             return @"WebEventTouchBegin";
    300         case WebEventTouchChange:
    301             return @"WebEventTouchChange";
    302         case WebEventTouchEnd:
    303             return @"WebEventTouchEnd";
    304         case WebEventTouchCancel:
    305             return @"WebEventTouchCancel";
    306         default:
    307             ASSERT_NOT_REACHED();
     286    case WebEventMouseDown:
     287        return @"WebEventMouseDown";
     288    case WebEventMouseUp:
     289        return @"WebEventMouseUp";
     290    case WebEventMouseMoved:
     291        return @"WebEventMouseMoved";
     292    case WebEventScrollWheel:
     293        return @"WebEventScrollWheel";
     294    case WebEventKeyDown:
     295        return @"WebEventKeyDown";
     296    case WebEventKeyUp:
     297        return @"WebEventKeyUp";
     298    case WebEventTouchBegin:
     299        return @"WebEventTouchBegin";
     300    case WebEventTouchChange:
     301        return @"WebEventTouchChange";
     302    case WebEventTouchEnd:
     303        return @"WebEventTouchEnd";
     304    case WebEventTouchCancel:
     305        return @"WebEventTouchCancel";
     306    default:
     307        ASSERT_NOT_REACHED();
    308308    }
    309309    return @"Unknown";
     
    336336{
    337337    switch (phase) {
    338         case WebEventTouchPhaseBegan:
    339             return @"WebEventTouchPhaseBegan";
    340         case WebEventTouchPhaseMoved:
    341             return @"WebEventTouchPhaseMoved";
    342         case WebEventTouchPhaseStationary:
    343             return @"WebEventTouchPhaseStationary";
    344         case WebEventTouchPhaseEnded:
    345             return @"WebEventTouchPhaseEnded";
    346         case WebEventTouchPhaseCancelled:
    347             return @"WebEventTouchPhaseCancelled";
    348         default:
    349             ASSERT_NOT_REACHED();
     338    case WebEventTouchPhaseBegan:
     339        return @"WebEventTouchPhaseBegan";
     340    case WebEventTouchPhaseMoved:
     341        return @"WebEventTouchPhaseMoved";
     342    case WebEventTouchPhaseStationary:
     343        return @"WebEventTouchPhaseStationary";
     344    case WebEventTouchPhaseEnded:
     345        return @"WebEventTouchPhaseEnded";
     346    case WebEventTouchPhaseCancelled:
     347        return @"WebEventTouchPhaseCancelled";
     348    default:
     349        ASSERT_NOT_REACHED();
    350350    }
    351351    return @"Unknown";
     
    366366{
    367367    switch (_type) {
    368         case WebEventMouseDown:
    369         case WebEventMouseUp:
    370         case WebEventMouseMoved:
    371             return [NSString stringWithFormat:@"location: (%f, %f)", _locationInWindow.x, _locationInWindow.y];
    372         case WebEventScrollWheel:
    373             return [NSString stringWithFormat:@"location: (%f, %f) deltaX: %f deltaY: %f", _locationInWindow.x, _locationInWindow.y, _deltaX, _deltaY];
    374         case WebEventKeyDown:
    375         case WebEventKeyUp:
    376             return [NSString stringWithFormat:@"chars: %@ charsNoModifiers: %@ flags: %d repeating: %d keyboardFlags: %lu keyCode %d, isTab: %d", _characters, _charactersIgnoringModifiers, _modifierFlags, _keyRepeating, static_cast<unsigned long>(_keyboardFlags), _keyCode, _tabKey];
    377         case WebEventTouchBegin:
    378         case WebEventTouchChange:
    379         case WebEventTouchEnd:
    380         case WebEventTouchCancel:
    381             return [NSString stringWithFormat:@"location: (%f, %f) count: %d locations: %@ identifiers: %@ phases: %@ isGesture: %d scale: %f rotation: %f", _locationInWindow.x, _locationInWindow.y, _touchCount, [self _touchLocationsDescription:_touchLocations], [self _touchIdentifiersDescription], [self _touchPhasesDescription], (_isGesture ? 1 : 0), _gestureScale, _gestureRotation];
    382         default:
    383             ASSERT_NOT_REACHED();
     368    case WebEventMouseDown:
     369    case WebEventMouseUp:
     370    case WebEventMouseMoved:
     371        return [NSString stringWithFormat:@"location: (%f, %f)", _locationInWindow.x, _locationInWindow.y];
     372    case WebEventScrollWheel:
     373        return [NSString stringWithFormat:@"location: (%f, %f) deltaX: %f deltaY: %f", _locationInWindow.x, _locationInWindow.y, _deltaX, _deltaY];
     374    case WebEventKeyDown:
     375    case WebEventKeyUp:
     376        return [NSString stringWithFormat:@"chars: %@ charsNoModifiers: %@ flags: %d repeating: %d keyboardFlags: %lu keyCode %d, isTab: %d", _characters, _charactersIgnoringModifiers, _modifierFlags, _keyRepeating, static_cast<unsigned long>(_keyboardFlags), _keyCode, _tabKey];
     377    case WebEventTouchBegin:
     378    case WebEventTouchChange:
     379    case WebEventTouchEnd:
     380    case WebEventTouchCancel:
     381        return [NSString stringWithFormat:@"location: (%f, %f) count: %d locations: %@ identifiers: %@ phases: %@ isGesture: %d scale: %f rotation: %f", _locationInWindow.x, _locationInWindow.y, _touchCount, [self _touchLocationsDescription:_touchLocations], [self _touchIdentifiersDescription], [self _touchPhasesDescription], (_isGesture ? 1 : 0), _gestureScale, _gestureRotation];
     382    default:
     383        ASSERT_NOT_REACHED();
    384384    }
    385385    return @"Unknown";
Note: See TracChangeset for help on using the changeset viewer.