⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 277354 in webkit


Ignore:
Timestamp:
May 11, 2021, 8:55:46 PM (5 years ago)
Author:
Devin Rousso
Message:

[macCatalyst] should have CSS hover: hover and pointer: fine
https://bugs.webkit.org/show_bug.cgi?id=225672

Reviewed by Tim Horton.

Source/WebKit:

Test: iOSMouseSupport.MouseAlwaysConnected

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::isMousePrimaryPointingDevice): Added.
(WebKit::hasAccessoryMousePointingDevice): Added.
(WebKit::hasAccessoryStylusPointingDevice): Added.
(WebKit::WebPage::hoverSupportedByPrimaryPointingDevice const):
(WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const):
(WebKit::WebPage::pointerCharacteristicsOfPrimaryPointingDevice const):
(WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const):
(WebKit::hasMouseDevice): Deleted.
macCatalyst should consider the mouse as the primary pointing device, just like macOS:

  • hover and any-hover should always be hover
  • pointer and any-pointer should always be fine (instead of only if an accessory mouse/stylus is connected)
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::notifyHasMouseDeviceChanged): Added.
(WebKit::WebProcessProxy::notifyHasStylusDeviceChanged):

  • UIProcess/ios/WebProcessProxyIOS.mm:

(WebKit::WebProcessProxy::platformInitialize):
(WebKit::WebProcessProxy::platformDestroy):
(WebKit::WebProcessProxy::notifyHasMouseDeviceChanged): Deleted.

  • UIProcess/ios/WKMouseDeviceObserver.h:
  • UIProcess/ios/WKMouseDeviceObserver.mm:
  • Shared/WebProcessCreationParameters.h:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • WebProcess/WebProcess.messages.in:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
Clean up macro usage to avoid unnecessary work on macCatalyst.
Drive-by: Move non-platform code to non-platform files.

Source/WTF:

  • wtf/PlatformHave.h:

Add HAVE_MOUSE_DEVICE_OBSERVATION and HAVE_STYLUS_DEVICE_OBSERVATION to make callsites
clearer instead of having a somewhat unrelated connection to HAVE_UIKIT_WITH_MOUSE_SUPPORT
and HAVE_PENCILKIT_TEXT_INPUT (not to mention both of them are PLATFORM(MACCATALYST)
which isn't desirable since macCatalyst should consider the mouse as the primary pointing
device, just like macOS).

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:

(TEST.iOSMouseSupport.MouseAlwaysConnected):

  • TestWebKitAPI/Tests/WebKitCocoa/iOSStylusSupport.mm:
Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r277344 r277354  
     12021-05-11  Devin Rousso  <drousso@apple.com>
     2
     3        [macCatalyst] should have CSS `hover: hover` and `pointer: fine`
     4        https://bugs.webkit.org/show_bug.cgi?id=225672
     5
     6        Reviewed by Tim Horton.
     7
     8        * wtf/PlatformHave.h:
     9        Add `HAVE_MOUSE_DEVICE_OBSERVATION` and `HAVE_STYLUS_DEVICE_OBSERVATION` to make callsites
     10        clearer instead of having a somewhat unrelated connection to `HAVE_UIKIT_WITH_MOUSE_SUPPORT`
     11        and `HAVE_PENCILKIT_TEXT_INPUT` (not to mention both of them are `PLATFORM(MACCATALYST)`
     12        which isn't desirable since macCatalyst should consider the mouse as the primary pointing
     13        device, just like macOS).
     14
    1152021-05-11  Alex Christensen  <achristensen@webkit.org>
    216
  • trunk/Source/WTF/wtf/PlatformHave.h

    r277344 r277354  
    484484#endif
    485485
     486#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400
     487#define HAVE_MOUSE_DEVICE_OBSERVATION 1
     488#endif
     489
    486490#if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
    487491#define HAVE_UI_HOVER_EVENT_RESPONDABLE 1
     
    791795#endif
    792796
     797#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
     798#define HAVE_STYLUS_DEVICE_OBSERVATION 1
     799#endif
     800
    793801#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000 || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
    794802#if !defined(HAVE_APPLE_ATTESTATION)
  • trunk/Source/WebKit/ChangeLog

    r277353 r277354  
     12021-05-11  Devin Rousso  <drousso@apple.com>
     2
     3        [macCatalyst] should have CSS `hover: hover` and `pointer: fine`
     4        https://bugs.webkit.org/show_bug.cgi?id=225672
     5
     6        Reviewed by Tim Horton.
     7
     8        Test: iOSMouseSupport.MouseAlwaysConnected
     9
     10        * WebProcess/WebPage/ios/WebPageIOS.mm:
     11        (WebKit::isMousePrimaryPointingDevice): Added.
     12        (WebKit::hasAccessoryMousePointingDevice): Added.
     13        (WebKit::hasAccessoryStylusPointingDevice): Added.
     14        (WebKit::WebPage::hoverSupportedByPrimaryPointingDevice const):
     15        (WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const):
     16        (WebKit::WebPage::pointerCharacteristicsOfPrimaryPointingDevice const):
     17        (WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const):
     18        (WebKit::hasMouseDevice): Deleted.
     19        macCatalyst should consider the mouse as the primary pointing device, just like macOS:
     20         - `hover` and `any-hover` should always be `hover`
     21         - `pointer` and `any-pointer` should always be `fine` (instead of only if an accessory mouse/stylus is connected)
     22
     23        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
     24        (WebKit::WebProcessPool::platformInitializeWebProcess):
     25        * UIProcess/WebProcessProxy.h:
     26        * UIProcess/WebProcessProxy.cpp:
     27        (WebKit::WebProcessProxy::notifyHasMouseDeviceChanged): Added.
     28        (WebKit::WebProcessProxy::notifyHasStylusDeviceChanged):
     29        * UIProcess/ios/WebProcessProxyIOS.mm:
     30        (WebKit::WebProcessProxy::platformInitialize):
     31        (WebKit::WebProcessProxy::platformDestroy):
     32        (WebKit::WebProcessProxy::notifyHasMouseDeviceChanged): Deleted.
     33        * UIProcess/ios/WKMouseDeviceObserver.h:
     34        * UIProcess/ios/WKMouseDeviceObserver.mm:
     35        * Shared/WebProcessCreationParameters.h:
     36        * Shared/WebProcessCreationParameters.cpp:
     37        (WebKit::WebProcessCreationParameters::encode const):
     38        (WebKit::WebProcessCreationParameters::decode):
     39        * WebProcess/WebProcess.messages.in:
     40        * WebProcess/WebProcess.h:
     41        * WebProcess/WebProcess.cpp:
     42        (WebKit::WebProcess::initializeWebProcess):
     43        * WebProcess/cocoa/WebProcessCocoa.mm:
     44        (WebKit::WebProcess::platformInitializeWebProcess):
     45        Clean up macro usage to avoid unnecessary work on macCatalyst.
     46        Drive-by: Move non-platform code to non-platform files.
     47
    1482021-05-11  Commit Queue  <commit-queue@webkit.org>
    249
  • trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp

    r276428 r277354  
    8989    encoder << textCheckerState;
    9090    encoder << fullKeyboardAccessEnabled;
    91 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     91#if HAVE(MOUSE_DEVICE_OBSERVATION)
    9292    encoder << hasMouseDevice;
    9393#endif
     94#if HAVE(STYLUS_DEVICE_OBSERVATION)
    9495    encoder << hasStylusDevice;
     96#endif
    9597    encoder << defaultRequestTimeoutInterval;
    9698    encoder << backForwardCacheCapacity;
     
    310312    if (!decoder.decode(parameters.fullKeyboardAccessEnabled))
    311313        return false;
    312 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     314#if HAVE(MOUSE_DEVICE_OBSERVATION)
    313315    if (!decoder.decode(parameters.hasMouseDevice))
    314316        return false;
    315317#endif
     318#if HAVE(STYLUS_DEVICE_OBSERVATION)
    316319    if (!decoder.decode(parameters.hasStylusDevice))
    317320        return false;
     321#endif
    318322    if (!decoder.decode(parameters.defaultRequestTimeoutInterval))
    319323        return false;
  • trunk/Source/WebKit/Shared/WebProcessCreationParameters.h

    r276428 r277354  
    121121    bool shouldUseFontSmoothing { true };
    122122    bool fullKeyboardAccessEnabled { false };
    123 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     123#if HAVE(MOUSE_DEVICE_OBSERVATION)
    124124    bool hasMouseDevice { false };
    125125#endif
     126#if HAVE(STYLUS_DEVICE_OBSERVATION)
    126127    bool hasStylusDevice { false };
     128#endif
    127129    bool memoryCacheDisabled { false };
    128130    bool attrStyleEnabled { false };
  • trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm

    r276644 r277354  
    437437#endif
    438438
    439 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     439#if HAVE(MOUSE_DEVICE_OBSERVATION)
    440440    parameters.hasMouseDevice = [[WKMouseDeviceObserver sharedInstance] hasMouseDevice];
    441441#endif
    442442
    443 #if HAVE(PENCILKIT_TEXT_INPUT)
     443#if HAVE(STYLUS_DEVICE_OBSERVATION)
    444444    parameters.hasStylusDevice = [[WKStylusDeviceObserver sharedInstance] hasStylusDevice];
    445445#endif
  • trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp

    r277294 r277354  
    11991199}
    12001200
     1201#if HAVE(MOUSE_DEVICE_OBSERVATION)
     1202
     1203void WebProcessProxy::notifyHasMouseDeviceChanged(bool hasMouseDevice)
     1204{
     1205    ASSERT(isMainRunLoop());
     1206    for (auto* webProcessProxy : WebProcessProxy::allProcesses().values())
     1207        webProcessProxy->send(Messages::WebProcess::SetHasMouseDevice(hasMouseDevice), 0);
     1208}
     1209
     1210#endif // HAVE(MOUSE_DEVICE_OBSERVATION)
     1211
     1212#if HAVE(STYLUS_DEVICE_OBSERVATION)
     1213
    12011214void WebProcessProxy::notifyHasStylusDeviceChanged(bool hasStylusDevice)
    12021215{
     1216    ASSERT(isMainRunLoop());
    12031217    for (auto* webProcessProxy : WebProcessProxy::allProcesses().values())
    12041218        webProcessProxy->send(Messages::WebProcess::SetHasStylusDevice(hasStylusDevice), 0);
    12051219}
     1220
     1221#endif // HAVE(STYLUS_DEVICE_OBSERVATION)
    12061222
    12071223void WebProcessProxy::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> dataTypes, CompletionHandler<void(WebsiteData)>&& completionHandler)
  • trunk/Source/WebKit/UIProcess/WebProcessProxy.h

    r276733 r277354  
    217217    static bool fullKeyboardAccessEnabled();
    218218
    219 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     219#if HAVE(MOUSE_DEVICE_OBSERVATION)
    220220    static void notifyHasMouseDeviceChanged(bool hasMouseDevice);
    221221#endif
    222222
     223#if HAVE(STYLUS_DEVICE_OBSERVATION)
    223224    static void notifyHasStylusDeviceChanged(bool hasStylusDevice);
     225#endif
    224226
    225227    void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, CompletionHandler<void(WebsiteData)>&&);
  • trunk/Source/WebKit/UIProcess/ios/WKMouseDeviceObserver.h

    r272326 r277354  
    2424 */
    2525
    26 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     26#if HAVE(MOUSE_DEVICE_OBSERVATION)
    2727
    2828#import "BackBoardServicesSPI.h"
     
    4949@end
    5050
    51 #endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     51#endif // HAVE(MOUSE_DEVICE_OBSERVATION)
  • trunk/Source/WebKit/UIProcess/ios/WKMouseDeviceObserver.mm

    r275937 r277354  
    2727#import "WKMouseDeviceObserver.h"
    2828
    29 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     29#if HAVE(MOUSE_DEVICE_OBSERVATION)
    3030
    3131#import "WebProcessProxy.h"
     
    126126@end
    127127
    128 #endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     128#endif // HAVE(MOUSE_DEVICE_OBSERVATION)
  • trunk/Source/WebKit/UIProcess/ios/WKStylusDeviceObserver.h

    r268384 r277354  
    2424 */
    2525
    26 #if HAVE(PENCILKIT_TEXT_INPUT)
     26#if HAVE(STYLUS_DEVICE_OBSERVATION)
    2727
    2828@interface WKStylusDeviceObserver : NSObject
     
    3939@end
    4040
    41 #endif // HAVE(PENCILKIT_TEXT_INPUT)
     41#endif // HAVE(STYLUS_DEVICE_OBSERVATION)
  • trunk/Source/WebKit/UIProcess/ios/WKStylusDeviceObserver.mm

    r273276 r277354  
    2727#import "WKStylusDeviceObserver.h"
    2828
    29 #if HAVE(PENCILKIT_TEXT_INPUT)
     29#if HAVE(STYLUS_DEVICE_OBSERVATION)
    3030
    3131#import "WebProcessProxy.h"
     
    125125@end
    126126
    127 #endif // HAVE(PENCILKIT_TEXT_INPUT)
     127#endif // HAVE(STYLUS_DEVICE_OBSERVATION)
  • trunk/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm

    r275937 r277354  
    3939void WebProcessProxy::platformInitialize()
    4040{
    41 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     41#if HAVE(MOUSE_DEVICE_OBSERVATION)
    4242    [[WKMouseDeviceObserver sharedInstance] start];
    4343#endif
    44 #if HAVE(PENCILKIT_TEXT_INPUT)
     44#if HAVE(STYLUS_DEVICE_OBSERVATION)
    4545    [[WKStylusDeviceObserver sharedInstance] start];
    4646#endif
     
    4949void WebProcessProxy::platformDestroy()
    5050{
    51 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     51#if HAVE(MOUSE_DEVICE_OBSERVATION)
    5252    [[WKMouseDeviceObserver sharedInstance] stop];
    5353#endif
    54 #if HAVE(PENCILKIT_TEXT_INPUT)
     54#if HAVE(STYLUS_DEVICE_OBSERVATION)
    5555    [[WKStylusDeviceObserver sharedInstance] stop];
    5656#endif
    5757}
    58 
    59 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
    60 
    61 void WebProcessProxy::notifyHasMouseDeviceChanged(bool hasMouseDevice)
    62 {
    63     ASSERT(isMainRunLoop());
    64     for (auto* webProcessProxy : WebProcessProxy::allProcesses().values())
    65         webProcessProxy->send(Messages::WebProcess::SetHasMouseDevice(hasMouseDevice), 0);
    66 }
    67 
    68 #endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)
    6958
    7059bool WebProcessProxy::fullKeyboardAccessEnabled()
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r277295 r277354  
    41804180}
    41814181
    4182 static bool hasMouseDevice()
    4183 {
    4184 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
    4185     return WebProcess::singleton().hasMouseDevice();
    4186 #elif HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(MACCATALYST)
     4182static bool isMousePrimaryPointingDevice()
     4183{
     4184#if PLATFORM(MACCATALYST)
    41874185    return true;
    41884186#else
     
    41914189}
    41924190
     4191static bool hasAccessoryMousePointingDevice()
     4192{
     4193    if (isMousePrimaryPointingDevice())
     4194        return true;
     4195
     4196#if HAVE(MOUSE_DEVICE_OBSERVATION)
     4197    if (WebProcess::singleton().hasMouseDevice())
     4198        return true;
     4199#endif
     4200
     4201    return false;
     4202}
     4203
     4204static bool hasAccessoryStylusPointingDevice()
     4205{
     4206#if HAVE(STYLUS_DEVICE_OBSERVATION)
     4207    if (WebProcess::singleton().hasStylusDevice())
     4208        return true;
     4209#endif
     4210
     4211    return false;
     4212}
     4213
    41934214bool WebPage::hoverSupportedByPrimaryPointingDevice() const
    41944215{
    4195     return false;
     4216    return isMousePrimaryPointingDevice();
    41964217}
    41974218
    41984219bool WebPage::hoverSupportedByAnyAvailablePointingDevice() const
    41994220{
    4200     return hasMouseDevice();
     4221    return hasAccessoryMousePointingDevice();
    42014222}
    42024223
    42034224Optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPointingDevice() const
    42044225{
    4205     return PointerCharacteristics::Coarse;
     4226    return isMousePrimaryPointingDevice() ? PointerCharacteristics::Fine : PointerCharacteristics::Coarse;
    42064227}
    42074228
    42084229OptionSet<PointerCharacteristics> WebPage::pointerCharacteristicsOfAllAvailablePointingDevices() const
    42094230{
    4210     OptionSet<PointerCharacteristics> result(PointerCharacteristics::Coarse);
    4211     if (hasMouseDevice() || WebProcess::singleton().hasStylusDevice())
     4231    OptionSet<PointerCharacteristics> result;
     4232    if (auto pointerCharacteristicsOfPrimaryPointingDevice = this->pointerCharacteristicsOfPrimaryPointingDevice())
     4233        result.add(*pointerCharacteristicsOfPrimaryPointingDevice);
     4234    if (hasAccessoryMousePointingDevice() || hasAccessoryStylusPointingDevice())
    42124235        result.add(PointerCharacteristics::Fine);
    42134236    return result;
  • trunk/Source/WebKit/WebProcess/WebProcess.cpp

    r276788 r277354  
    458458    m_fullKeyboardAccessEnabled = parameters.fullKeyboardAccessEnabled;
    459459
     460#if HAVE(MOUSE_DEVICE_OBSERVATION)
     461    m_hasMouseDevice = parameters.hasMouseDevice;
     462#endif
     463
     464#if HAVE(STYLUS_DEVICE_OBSERVATION)
    460465    m_hasStylusDevice = parameters.hasStylusDevice;
     466#endif
    461467
    462468    for (auto& scheme : parameters.urlSchemesRegisteredAsEmptyDocument)
     
    983989}
    984990
    985 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     991#if HAVE(MOUSE_DEVICE_OBSERVATION)
    986992
    987993void WebProcess::setHasMouseDevice(bool hasMouseDevice)
     
    9951001}
    9961002
    997 #endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     1003#endif // HAVE(MOUSE_DEVICE_OBSERVATION)
     1004
     1005#if HAVE(STYLUS_DEVICE_OBSERVATION)
    9981006
    9991007void WebProcess::setHasStylusDevice(bool hasStylusDevice)
     
    10061014    Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
    10071015}
     1016
     1017#endif // HAVE(STYLUS_DEVICE_OBSERVATION)
    10081018
    10091019#if ENABLE(GAMEPAD)
  • trunk/Source/WebKit/WebProcess/WebProcess.h

    r276788 r277354  
    202202    bool fullKeyboardAccessEnabled() const { return m_fullKeyboardAccessEnabled; }
    203203
    204 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     204#if HAVE(MOUSE_DEVICE_OBSERVATION)
    205205    bool hasMouseDevice() const { return m_hasMouseDevice; }
    206206    void setHasMouseDevice(bool);
    207207#endif
    208208
     209#if HAVE(STYLUS_DEVICE_OBSERVATION)
    209210    bool hasStylusDevice() const { return m_hasStylusDevice; }
    210211    void setHasStylusDevice(bool);
     212#endif
    211213
    212214    WebFrame* webFrame(WebCore::FrameIdentifier) const;
     
    615617    bool m_fullKeyboardAccessEnabled { false };
    616618
    617 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     619#if HAVE(MOUSE_DEVICE_OBSERVATION)
    618620    bool m_hasMouseDevice { false };
    619621#endif
    620622
     623#if HAVE(STYLUS_DEVICE_OBSERVATION)
    621624    bool m_hasStylusDevice { false };
     625#endif
    622626
    623627    HashMap<WebCore::FrameIdentifier, WebFrame*> m_frameMap;
  • trunk/Source/WebKit/WebProcess/WebProcess.messages.in

    r275163 r277354  
    5151    FullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
    5252
    53 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
     53#if HAVE(MOUSE_DEVICE_OBSERVATION)
    5454    SetHasMouseDevice(bool hasMouseDevice)
    5555#endif
    5656
     57#if HAVE(STYLUS_DEVICE_OBSERVATION)
    5758    SetHasStylusDevice(bool hasStylusDevice)
     59#endif
    5860
    5961    RefreshPlugins()
  • trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

    r276852 r277354  
    393393    }
    394394
    395 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT) && PLATFORM(IOS)
    396     m_hasMouseDevice = parameters.hasMouseDevice;
    397 #endif
    398 
    399395    WebCore::setScreenProperties(parameters.screenProperties);
    400396
  • trunk/Tools/ChangeLog

    r277353 r277354  
     12021-05-11  Devin Rousso  <drousso@apple.com>
     2
     3        [macCatalyst] should have CSS `hover: hover` and `pointer: fine`
     4        https://bugs.webkit.org/show_bug.cgi?id=225672
     5
     6        Reviewed by Tim Horton.
     7
     8        * TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:
     9        (TEST.iOSMouseSupport.MouseAlwaysConnected):
     10        * TestWebKitAPI/Tests/WebKitCocoa/iOSStylusSupport.mm:
     11
    1122021-05-11  Commit Queue  <commit-queue@webkit.org>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm

    r276351 r277354  
    371371#endif // ENABLE(IOS_TOUCH_EVENTS)
    372372
    373 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
    374 
    375 #if PLATFORM(IOS)
     373#if HAVE(MOUSE_DEVICE_OBSERVATION)
    376374
    377375@interface WKMouseDeviceObserver
     
    525523}
    526524
    527 #endif // PLATFORM(IOS)
     525#endif // HAVE(MOUSE_DEVICE_OBSERVATION)
    528526
    529527#if PLATFORM(MACCATALYST)
     
    535533    [webView synchronouslyLoadHTMLString:@""];
    536534
    537     EXPECT_FALSE([webView evaluateMediaQuery:@"hover"]);
    538     EXPECT_TRUE([webView evaluateMediaQuery:@"hover: none"]);
    539     EXPECT_FALSE([webView evaluateMediaQuery:@"hover: hover"]);
     535    EXPECT_TRUE([webView evaluateMediaQuery:@"hover"]);
     536    EXPECT_FALSE([webView evaluateMediaQuery:@"hover: none"]);
     537    EXPECT_TRUE([webView evaluateMediaQuery:@"hover: hover"]);
    540538
    541539    EXPECT_TRUE([webView evaluateMediaQuery:@"any-hover"]);
     
    545543    EXPECT_TRUE([webView evaluateMediaQuery:@"pointer"]);
    546544    EXPECT_FALSE([webView evaluateMediaQuery:@"pointer: none"]);
    547     EXPECT_TRUE([webView evaluateMediaQuery:@"pointer: coarse"]);
    548     EXPECT_FALSE([webView evaluateMediaQuery:@"pointer: fine"]);
     545    EXPECT_FALSE([webView evaluateMediaQuery:@"pointer: coarse"]);
     546    EXPECT_TRUE([webView evaluateMediaQuery:@"pointer: fine"]);
    549547
    550548    EXPECT_TRUE([webView evaluateMediaQuery:@"any-pointer"]);
    551549    EXPECT_FALSE([webView evaluateMediaQuery:@"any-pointer: none"]);
    552     EXPECT_TRUE([webView evaluateMediaQuery:@"any-pointer: coarse"]);
     550    EXPECT_FALSE([webView evaluateMediaQuery:@"any-pointer: coarse"]);
    553551    EXPECT_TRUE([webView evaluateMediaQuery:@"any-pointer: fine"]);
    554552}
     
    556554#endif // PLATFORM(MACCATALYST)
    557555
    558 #endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)
    559 
    560556#endif // PLATFORM(IOS) || PLATFORM(MACCATALYST)
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/iOSStylusSupport.mm

    r268384 r277354  
    3535#import <WebKit/WebKit.h>
    3636
    37 #if HAVE(PENCILKIT_TEXT_INPUT)
     37#if HAVE(STYLUS_DEVICE_OBSERVATION)
    3838
    3939@interface WKStylusDeviceObserver
     
    173173}
    174174
    175 #endif // HAVE(PENCILKIT_TEXT_INPUT)
     175#endif // HAVE(STYLUS_DEVICE_OBSERVATION)
    176176
    177177#endif // PLATFORM(IOS)
Note: See TracChangeset for help on using the changeset viewer.