Title: [239275] trunk
- Revision
- 239275
- Author
- dba...@webkit.org
- Date
- 2018-12-17 10:58:52 -0800 (Mon, 17 Dec 2018)
Log Message
[iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
https://bugs.webkit.org/show_bug.cgi?id=192633
Reviewed by Wenson Hsieh.
Source/WebCore:
UIKit has long adopted the newer -[WebEvent initWithKeyEventType:] initializer that takes an
input manager hint. We no longer need to keep the variant -[WebEvent initWithKeyEventType:...:characterSet:]
for binary compatibility.
* platform/ios/WebEvent.h:
* platform/ios/WebEvent.mm:
(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): Deleted.
Source/WebKit:
Update code to use the modern initializer.
* UIProcess/ios/WKWebEvent.mm:
(-[WKWebEvent initWithEvent:]):
Tools:
Update code to use the modern initializer.
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController keyDown:withModifiers:withLocation:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (239274 => 239275)
--- trunk/Source/WebCore/ChangeLog 2018-12-17 18:56:24 UTC (rev 239274)
+++ trunk/Source/WebCore/ChangeLog 2018-12-17 18:58:52 UTC (rev 239275)
@@ -1,3 +1,18 @@
+2018-12-17 Daniel Bates <daba...@apple.com>
+
+ [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
+ https://bugs.webkit.org/show_bug.cgi?id=192633
+
+ Reviewed by Wenson Hsieh.
+
+ UIKit has long adopted the newer -[WebEvent initWithKeyEventType:] initializer that takes an
+ input manager hint. We no longer need to keep the variant -[WebEvent initWithKeyEventType:...:characterSet:]
+ for binary compatibility.
+
+ * platform/ios/WebEvent.h:
+ * platform/ios/WebEvent.mm:
+ (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): Deleted.
+
2018-12-17 Matt Lewis <jlew...@apple.com>
Unreviewed, rolling out r239254.
Modified: trunk/Source/WebCore/platform/ios/WebEvent.h (239274 => 239275)
--- trunk/Source/WebCore/platform/ios/WebEvent.h 2018-12-17 18:56:24 UTC (rev 239274)
+++ trunk/Source/WebCore/platform/ios/WebEvent.h 2018-12-17 18:58:52 UTC (rev 239275)
@@ -159,7 +159,6 @@
gestureScale:(float)gestureScale
gestureRotation:(float)gestureRotation;
-// FIXME: this needs to be removed when UIKit adopts the other initializer.
- (WebEvent *)initWithKeyEventType:(WebEventType)type
timeStamp:(CFTimeInterval)timeStamp
characters:(NSString *)characters
@@ -167,17 +166,6 @@
modifiers:(WebEventFlags)modifiers
isRepeating:(BOOL)repeating
withFlags:(WebKeyboardInputFlags)flags
- keyCode:(uint16_t)keyCode
- isTabKey:(BOOL)tabKey
- characterSet:(WebEventCharacterSet)characterSet;
-
-- (WebEvent *)initWithKeyEventType:(WebEventType)type
- timeStamp:(CFTimeInterval)timeStamp
- characters:(NSString *)characters
- charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
- modifiers:(WebEventFlags)modifiers
- isRepeating:(BOOL)repeating
- withFlags:(WebKeyboardInputFlags)flags
withInputManagerHint:(NSString *)hint
keyCode:(uint16_t)keyCode
isTabKey:(BOOL)tabKey;
Modified: trunk/Source/WebCore/platform/ios/WebEvent.mm (239274 => 239275)
--- trunk/Source/WebCore/platform/ios/WebEvent.mm 2018-12-17 18:56:24 UTC (rev 239274)
+++ trunk/Source/WebCore/platform/ios/WebEvent.mm 2018-12-17 18:58:52 UTC (rev 239275)
@@ -157,7 +157,6 @@
return characters;
}
-// FIXME: to be removed when the adoption of the new initializer is complete.
- (WebEvent *)initWithKeyEventType:(WebEventType)type
timeStamp:(CFTimeInterval)timeStamp
characters:(NSString *)characters
@@ -165,43 +164,6 @@
modifiers:(WebEventFlags)modifiers
isRepeating:(BOOL)repeating
withFlags:(NSUInteger)flags
- keyCode:(uint16_t)keyCode
- isTabKey:(BOOL)tabKey
- characterSet:(WebEventCharacterSet)characterSet
-{
- UNUSED_PARAM(characterSet);
- self = [super init];
- if (!self)
- return nil;
-
- _type = type;
- _timestamp = timeStamp;
- _keyboardFlags = flags;
- _modifierFlags = modifiers;
- if (keyCode)
- _keyCode = windowsKeyCodeForKeyCode(keyCode);
- else if ([charactersIgnoringModifiers length] == 1) {
- // This event is likely for a software keyboard-generated event.
- _keyCode = windowsKeyCodeForCharCodeIOS([charactersIgnoringModifiers characterAtIndex:0]);
- }
-
- if (!(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged)) {
- _characters = [normalizedStringWithAppKitCompatibilityMapping(characters, keyCode) retain];
- _charactersIgnoringModifiers = [normalizedStringWithAppKitCompatibilityMapping(charactersIgnoringModifiers, keyCode) retain];
- _tabKey = tabKey;
- _keyRepeating = repeating;
- }
-
- return self;
-}
-
-- (WebEvent *)initWithKeyEventType:(WebEventType)type
- timeStamp:(CFTimeInterval)timeStamp
- characters:(NSString *)characters
- charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
- modifiers:(WebEventFlags)modifiers
- isRepeating:(BOOL)repeating
- withFlags:(NSUInteger)flags
withInputManagerHint:(NSString *)hint
keyCode:(uint16_t)keyCode
isTabKey:(BOOL)tabKey
Modified: trunk/Source/WebKit/ChangeLog (239274 => 239275)
--- trunk/Source/WebKit/ChangeLog 2018-12-17 18:56:24 UTC (rev 239274)
+++ trunk/Source/WebKit/ChangeLog 2018-12-17 18:58:52 UTC (rev 239275)
@@ -1,3 +1,15 @@
+2018-12-17 Daniel Bates <daba...@apple.com>
+
+ [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
+ https://bugs.webkit.org/show_bug.cgi?id=192633
+
+ Reviewed by Wenson Hsieh.
+
+ Update code to use the modern initializer.
+
+ * UIProcess/ios/WKWebEvent.mm:
+ (-[WKWebEvent initWithEvent:]):
+
2018-12-17 Matt Lewis <jlew...@apple.com>
Unreviewed, rolling out r239254.
Modified: trunk/Source/WebKit/UIProcess/ios/WKWebEvent.mm (239274 => 239275)
--- trunk/Source/WebKit/UIProcess/ios/WKWebEvent.mm 2018-12-17 18:56:24 UTC (rev 239274)
+++ trunk/Source/WebKit/UIProcess/ios/WKWebEvent.mm 2018-12-17 18:58:52 UTC (rev 239275)
@@ -53,7 +53,7 @@
event = [[keyEvent _cloneEvent] autorelease]; // UIKit uses a singleton for hardware keyboard events.
}
- self = [super initWithKeyEventType:(event._isKeyDown ? WebEventKeyDown : WebEventKeyUp) timeStamp:event.timestamp characters:event._modifiedInput charactersIgnoringModifiers:event._unmodifiedInput modifiers:modifierFlags isRepeating:(inputFlags & kUIKeyboardInputRepeat) withFlags:inputFlags keyCode:keyCode isTabKey:[event._modifiedInput isEqualToString:@"\t"] characterSet:WebEventCharacterSetUnicode];
+ self = [super initWithKeyEventType:(event._isKeyDown ? WebEventKeyDown : WebEventKeyUp) timeStamp:event.timestamp characters:event._modifiedInput charactersIgnoringModifiers:event._unmodifiedInput modifiers:modifierFlags isRepeating:(inputFlags & kUIKeyboardInputRepeat) withFlags:inputFlags withInputManagerHint:nil keyCode:keyCode isTabKey:[event._modifiedInput isEqualToString:@"\t"]];
if (!self)
return nil;
Modified: trunk/Tools/ChangeLog (239274 => 239275)
--- trunk/Tools/ChangeLog 2018-12-17 18:56:24 UTC (rev 239274)
+++ trunk/Tools/ChangeLog 2018-12-17 18:58:52 UTC (rev 239275)
@@ -1,3 +1,15 @@
+2018-12-17 Daniel Bates <daba...@apple.com>
+
+ [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
+ https://bugs.webkit.org/show_bug.cgi?id=192633
+
+ Reviewed by Wenson Hsieh.
+
+ Update code to use the modern initializer.
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController keyDown:withModifiers:withLocation:]):
+
2018-12-17 Matt Lewis <jlew...@apple.com>
Unreviewed, rolling out r239254.
Modified: trunk/Tools/DumpRenderTree/mac/EventSendingController.mm (239274 => 239275)
--- trunk/Tools/DumpRenderTree/mac/EventSendingController.mm 2018-12-17 18:56:24 UTC (rev 239274)
+++ trunk/Tools/DumpRenderTree/mac/EventSendingController.mm 2018-12-17 18:58:52 UTC (rev 239275)
@@ -1134,16 +1134,7 @@
isARepeat:NO
keyCode:keyCode];
#else
- WebEvent *event = [[WebEvent alloc] initWithKeyEventType:WebEventKeyDown
- timeStamp:[self currentEventTime]
- characters:eventCharacter
- charactersIgnoringModifiers:charactersIgnoringModifiers
- modifiers:(WebEventFlags)modifierFlags
- isRepeating:NO
- withFlags:0
- keyCode:[character characterAtIndex:0]
- isTabKey:([character characterAtIndex:0] == '\t')
- characterSet:WebEventCharacterSetASCII];
+ WebEvent *event = [[WebEvent alloc] initWithKeyEventType:WebEventKeyDown timeStamp:[self currentEventTime] characters:eventCharacter charactersIgnoringModifiers:charactersIgnoringModifiers modifiers:(WebEventFlags)modifierFlags isRepeating:NO withFlags:0 withInputManagerHint:nil keyCode:[character characterAtIndex:0] isTabKey:([character characterAtIndex:0] == '\t')];
#endif
#if !PLATFORM(IOS_FAMILY)
@@ -1167,16 +1158,7 @@
keyCode:keyCode];
#else
[event release];
- event = [[WebEvent alloc] initWithKeyEventType:WebEventKeyUp
- timeStamp:[self currentEventTime]
- characters:eventCharacter
- charactersIgnoringModifiers:charactersIgnoringModifiers
- modifiers:(WebEventFlags)modifierFlags
- isRepeating:NO
- withFlags:0
- keyCode:[character characterAtIndex:0]
- isTabKey:([character characterAtIndex:0] == '\t')
- characterSet:WebEventCharacterSetASCII];
+ event = [[WebEvent alloc] initWithKeyEventType:WebEventKeyUp timeStamp:[self currentEventTime] characters:eventCharacter charactersIgnoringModifiers:charactersIgnoringModifiers modifiers:(WebEventFlags)modifierFlags isRepeating:NO withFlags:0 withInputManagerHint:nil keyCode:[character characterAtIndex:0] isTabKey:([character characterAtIndex:0] == '\t')];
#endif
#if !PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes