Changeset 237045 in webkit


Ignore:
Timestamp:
Oct 11, 2018 1:29:57 PM (6 years ago)
Author:
dbates@webkit.org
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]):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r237040 r237045  
     12018-10-11  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Add typedef for WebEvent keyboard flags
     4        https://bugs.webkit.org/show_bug.cgi?id=190435
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Currently WebEvent and UIKit SPI are intertwined when it comes to keyboard flags. It seems sufficient
     9        to have WebEvent defined its own keyboard flags so that callers do not need to be aware of UIKit SPI.
     10
     11        No functionality changed. So, no new tests.
     12
     13        * platform/ios/WebEvent.h:
     14        * platform/ios/WebEvent.mm:
     15        (-[WebEvent keyboardFlags]):
     16
    1172018-10-11  Antti Koivisto  <antti@apple.com>
    218
  • trunk/Source/WebCore/platform/ios/WebEvent.h

    r212376 r237045  
    7676} WebEventCharacterSet;
    7777
     78// These enum values are copied directly from UIKit for compatibility.
     79typedef enum {
     80    WebEventKeyboardInputRepeat = 1 << 0,
     81} WebKeyboardInputFlagValues;
     82typedef NSUInteger WebKeyboardInputFlags;
     83
    7884WEBCORE_EXPORT @interface WebEvent : NSObject {
    7985@private
     
    8793    WebEventFlags _modifierFlags;
    8894    BOOL _keyRepeating;
    89     NSUInteger _keyboardFlags;
     95    WebKeyboardInputFlags _keyboardFlags;
    9096    NSString *_inputManagerHint;
    9197    uint16_t _keyCode;
     
    134140                         modifiers:(WebEventFlags)modifiers
    135141                       isRepeating:(BOOL)repeating
    136                          withFlags:(NSUInteger)flags
     142                         withFlags:(WebKeyboardInputFlags)flags
    137143                           keyCode:(uint16_t)keyCode
    138144                          isTabKey:(BOOL)tabKey
     
    145151                         modifiers:(WebEventFlags)modifiers
    146152                       isRepeating:(BOOL)repeating
    147                          withFlags:(NSUInteger)flags
     153                         withFlags:(WebKeyboardInputFlags)flags
    148154              withInputManagerHint:(NSString *)hint
    149155                           keyCode:(uint16_t)keyCode
     
    163169@property(nonatomic, readonly, retain) NSString *inputManagerHint;
    164170
    165 @property(nonatomic, readonly) NSUInteger keyboardFlags;
     171@property(nonatomic, readonly) WebKeyboardInputFlags keyboardFlags;
    166172@property(nonatomic, readonly) uint16_t keyCode;
    167173@property(nonatomic, readonly, getter = isTabKey) BOOL tabKey;
  • trunk/Source/WebCore/platform/ios/WebEvent.mm

    r237007 r237045  
    428428}
    429429
    430 - (NSUInteger)keyboardFlags
     430- (WebKeyboardInputFlags)keyboardFlags
    431431{
    432432    ASSERT(_type == WebEventKeyDown || _type == WebEventKeyUp);
Note: See TracChangeset for help on using the changeset viewer.