Title: [237045] trunk/Source/WebCore
- Revision
- 237045
- Author
- [email protected]
- Date
- 2018-10-11 13:29:57 -0700 (Thu, 11 Oct 2018)
Log Message
[iOS] Add typedef for WebEvent keyboard flags
https://bugs.webkit.org/show_bug.cgi?id=190435
Reviewed by Wenson Hsieh.
Currently WebEvent and UIKit SPI are intertwined when it comes to keyboard flags. It seems sufficient
to have WebEvent defined its own keyboard flags so that callers do not need to be aware of UIKit SPI.
No functionality changed. So, no new tests.
* platform/ios/WebEvent.h:
* platform/ios/WebEvent.mm:
(-[WebEvent keyboardFlags]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (237044 => 237045)
--- trunk/Source/WebCore/ChangeLog 2018-10-11 19:32:56 UTC (rev 237044)
+++ trunk/Source/WebCore/ChangeLog 2018-10-11 20:29:57 UTC (rev 237045)
@@ -1,3 +1,19 @@
+2018-10-11 Daniel Bates <[email protected]>
+
+ [iOS] Add typedef for WebEvent keyboard flags
+ https://bugs.webkit.org/show_bug.cgi?id=190435
+
+ Reviewed by Wenson Hsieh.
+
+ Currently WebEvent and UIKit SPI are intertwined when it comes to keyboard flags. It seems sufficient
+ to have WebEvent defined its own keyboard flags so that callers do not need to be aware of UIKit SPI.
+
+ No functionality changed. So, no new tests.
+
+ * platform/ios/WebEvent.h:
+ * platform/ios/WebEvent.mm:
+ (-[WebEvent keyboardFlags]):
+
2018-10-11 Antti Koivisto <[email protected]>
Use finer grained locking in FontDatabase
Modified: trunk/Source/WebCore/platform/ios/WebEvent.h (237044 => 237045)
--- trunk/Source/WebCore/platform/ios/WebEvent.h 2018-10-11 19:32:56 UTC (rev 237044)
+++ trunk/Source/WebCore/platform/ios/WebEvent.h 2018-10-11 20:29:57 UTC (rev 237045)
@@ -75,6 +75,12 @@
WebEventCharacterSetFunctionKeys = 254,
} WebEventCharacterSet;
+// These enum values are copied directly from UIKit for compatibility.
+typedef enum {
+ WebEventKeyboardInputRepeat = 1 << 0,
+} WebKeyboardInputFlagValues;
+typedef NSUInteger WebKeyboardInputFlags;
+
WEBCORE_EXPORT @interface WebEvent : NSObject {
@private
WebEventType _type;
@@ -86,7 +92,7 @@
NSString *_charactersIgnoringModifiers;
WebEventFlags _modifierFlags;
BOOL _keyRepeating;
- NSUInteger _keyboardFlags;
+ WebKeyboardInputFlags _keyboardFlags;
NSString *_inputManagerHint;
uint16_t _keyCode;
BOOL _tabKey;
@@ -133,7 +139,7 @@
charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
modifiers:(WebEventFlags)modifiers
isRepeating:(BOOL)repeating
- withFlags:(NSUInteger)flags
+ withFlags:(WebKeyboardInputFlags)flags
keyCode:(uint16_t)keyCode
isTabKey:(BOOL)tabKey
characterSet:(WebEventCharacterSet)characterSet;
@@ -144,7 +150,7 @@
charactersIgnoringModifiers:(NSString *)charactersIgnoringModifiers
modifiers:(WebEventFlags)modifiers
isRepeating:(BOOL)repeating
- withFlags:(NSUInteger)flags
+ withFlags:(WebKeyboardInputFlags)flags
withInputManagerHint:(NSString *)hint
keyCode:(uint16_t)keyCode
isTabKey:(BOOL)tabKey;
@@ -162,7 +168,7 @@
@property(nonatomic, readonly, getter = isKeyRepeating) BOOL keyRepeating;
@property(nonatomic, readonly, retain) NSString *inputManagerHint;
-@property(nonatomic, readonly) NSUInteger keyboardFlags;
+@property(nonatomic, readonly) WebKeyboardInputFlags keyboardFlags;
@property(nonatomic, readonly) uint16_t keyCode;
@property(nonatomic, readonly, getter = isTabKey) BOOL tabKey;
Modified: trunk/Source/WebCore/platform/ios/WebEvent.mm (237044 => 237045)
--- trunk/Source/WebCore/platform/ios/WebEvent.mm 2018-10-11 19:32:56 UTC (rev 237044)
+++ trunk/Source/WebCore/platform/ios/WebEvent.mm 2018-10-11 20:29:57 UTC (rev 237045)
@@ -427,7 +427,7 @@
return _keyRepeating;
}
-- (NSUInteger)keyboardFlags
+- (WebKeyboardInputFlags)keyboardFlags
{
ASSERT(_type == WebEventKeyDown || _type == WebEventKeyUp);
return _keyboardFlags;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes