Cleanup WebEvent.mm
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2018 21:30:53 +0000 (21:30 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2018 21:30:53 +0000 (21:30 +0000)
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]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236982 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/ios/WebEvent.mm

index f2b57ce..844acc7 100644 (file)
@@ -1,3 +1,18 @@
+2018-10-09  Daniel Bates  <dabates@apple.com>
+
+        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]):
+
 2018-10-09  Oriol Brufau  <obrufau@igalia.com>
 
         Resolve inset properties to computed style when there is overconstraintment
index f247386..bce242d 100644 (file)
@@ -254,28 +254,28 @@ static NSString* normalizedStringWithAppKitCompatibilityMapping(NSString *charac
 - (NSString *)_typeDescription
 {
     switch (_type) {
-        case WebEventMouseDown:
-            return @"WebEventMouseDown";
-        case WebEventMouseUp:
-            return @"WebEventMouseUp";
-        case WebEventMouseMoved:
-            return @"WebEventMouseMoved";
-        case WebEventScrollWheel:
-            return @"WebEventScrollWheel";
-        case WebEventKeyDown:
-            return @"WebEventKeyDown";
-        case WebEventKeyUp:
-            return @"WebEventKeyUp";
-        case WebEventTouchBegin:
-            return @"WebEventTouchBegin";
-        case WebEventTouchChange:
-            return @"WebEventTouchChange";
-        case WebEventTouchEnd:
-            return @"WebEventTouchEnd";
-        case WebEventTouchCancel:
-            return @"WebEventTouchCancel";
-        default:
-            ASSERT_NOT_REACHED();
+    case WebEventMouseDown:
+        return @"WebEventMouseDown";
+    case WebEventMouseUp:
+        return @"WebEventMouseUp";
+    case WebEventMouseMoved:
+        return @"WebEventMouseMoved";
+    case WebEventScrollWheel:
+        return @"WebEventScrollWheel";
+    case WebEventKeyDown:
+        return @"WebEventKeyDown";
+    case WebEventKeyUp:
+        return @"WebEventKeyUp";
+    case WebEventTouchBegin:
+        return @"WebEventTouchBegin";
+    case WebEventTouchChange:
+        return @"WebEventTouchChange";
+    case WebEventTouchEnd:
+        return @"WebEventTouchEnd";
+    case WebEventTouchCancel:
+        return @"WebEventTouchCancel";
+    default:
+        ASSERT_NOT_REACHED();
     }
     return @"Unknown";
 }
@@ -283,28 +283,28 @@ static NSString* normalizedStringWithAppKitCompatibilityMapping(NSString *charac
 - (NSString *)_modiferFlagsDescription
 {
     switch (_modifierFlags) {
-        case WebEventMouseDown:
-            return @"WebEventMouseDown";
-        case WebEventMouseUp:
-            return @"WebEventMouseUp";
-        case WebEventMouseMoved:
-            return @"WebEventMouseMoved";
-        case WebEventScrollWheel:
-            return @"WebEventScrollWheel";
-        case WebEventKeyDown:
-            return @"WebEventKeyDown";
-        case WebEventKeyUp:
-            return @"WebEventKeyUp";
-        case WebEventTouchBegin:
-            return @"WebEventTouchBegin";
-        case WebEventTouchChange:
-            return @"WebEventTouchChange";
-        case WebEventTouchEnd:
-            return @"WebEventTouchEnd";
-        case WebEventTouchCancel:
-            return @"WebEventTouchCancel";
-        default:
-            ASSERT_NOT_REACHED();
+    case WebEventMouseDown:
+        return @"WebEventMouseDown";
+    case WebEventMouseUp:
+        return @"WebEventMouseUp";
+    case WebEventMouseMoved:
+        return @"WebEventMouseMoved";
+    case WebEventScrollWheel:
+        return @"WebEventScrollWheel";
+    case WebEventKeyDown:
+        return @"WebEventKeyDown";
+    case WebEventKeyUp:
+        return @"WebEventKeyUp";
+    case WebEventTouchBegin:
+        return @"WebEventTouchBegin";
+    case WebEventTouchChange:
+        return @"WebEventTouchChange";
+    case WebEventTouchEnd:
+        return @"WebEventTouchEnd";
+    case WebEventTouchCancel:
+        return @"WebEventTouchCancel";
+    default:
+        ASSERT_NOT_REACHED();
     }
     return @"Unknown";
 }
@@ -335,18 +335,18 @@ static NSString* normalizedStringWithAppKitCompatibilityMapping(NSString *charac
 - (NSString *)_touchPhaseDescription:(WebEventTouchPhaseType)phase
 {
     switch (phase) {
-        case WebEventTouchPhaseBegan:
-            return @"WebEventTouchPhaseBegan";
-        case WebEventTouchPhaseMoved:
-            return @"WebEventTouchPhaseMoved";
-        case WebEventTouchPhaseStationary:
-            return @"WebEventTouchPhaseStationary";
-        case WebEventTouchPhaseEnded:
-            return @"WebEventTouchPhaseEnded";
-        case WebEventTouchPhaseCancelled:
-            return @"WebEventTouchPhaseCancelled";
-        default:
-            ASSERT_NOT_REACHED();
+    case WebEventTouchPhaseBegan:
+        return @"WebEventTouchPhaseBegan";
+    case WebEventTouchPhaseMoved:
+        return @"WebEventTouchPhaseMoved";
+    case WebEventTouchPhaseStationary:
+        return @"WebEventTouchPhaseStationary";
+    case WebEventTouchPhaseEnded:
+        return @"WebEventTouchPhaseEnded";
+    case WebEventTouchPhaseCancelled:
+        return @"WebEventTouchPhaseCancelled";
+    default:
+        ASSERT_NOT_REACHED();
     }
     return @"Unknown";
 }
@@ -365,22 +365,22 @@ static NSString* normalizedStringWithAppKitCompatibilityMapping(NSString *charac
 - (NSString *)_eventDescription
 {
     switch (_type) {
-        case WebEventMouseDown:
-        case WebEventMouseUp:
-        case WebEventMouseMoved:
-            return [NSString stringWithFormat:@"location: (%f, %f)", _locationInWindow.x, _locationInWindow.y];
-        case WebEventScrollWheel:
-            return [NSString stringWithFormat:@"location: (%f, %f) deltaX: %f deltaY: %f", _locationInWindow.x, _locationInWindow.y, _deltaX, _deltaY];
-        case WebEventKeyDown:
-        case WebEventKeyUp:
-            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];
-        case WebEventTouchBegin:
-        case WebEventTouchChange:
-        case WebEventTouchEnd:
-        case WebEventTouchCancel:
-            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];
-        default:
-            ASSERT_NOT_REACHED();
+    case WebEventMouseDown:
+    case WebEventMouseUp:
+    case WebEventMouseMoved:
+        return [NSString stringWithFormat:@"location: (%f, %f)", _locationInWindow.x, _locationInWindow.y];
+    case WebEventScrollWheel:
+        return [NSString stringWithFormat:@"location: (%f, %f) deltaX: %f deltaY: %f", _locationInWindow.x, _locationInWindow.y, _deltaX, _deltaY];
+    case WebEventKeyDown:
+    case WebEventKeyUp:
+        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];
+    case WebEventTouchBegin:
+    case WebEventTouchChange:
+    case WebEventTouchEnd:
+    case WebEventTouchCancel:
+        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];
+    default:
+        ASSERT_NOT_REACHED();
     }
     return @"Unknown";
 }