Changeset 261135 in webkit


Ignore:
Timestamp:
May 4, 2020 6:18:41 PM (4 years ago)
Author:
timothy_horton@apple.com
Message:

Unreviewed, reverting r261117.

Broke lots of API tests

Reverted changeset:

"Excessive error logging from daemons trying to use WebKit,
under -[UIDevice currentDevice]"
https://bugs.webkit.org/show_bug.cgi?id=211397
https://trac.webkit.org/changeset/261117

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r261134 r261135  
     12020-05-04  Timothy Horton  <timothy_horton@apple.com>
     2
     3        Unreviewed, reverting r261117.
     4
     5        Broke lots of API tests
     6
     7        Reverted changeset:
     8
     9        "Excessive error logging from daemons trying to use WebKit,
     10        under -[UIDevice currentDevice]"
     11        https://bugs.webkit.org/show_bug.cgi?id=211397
     12        https://trac.webkit.org/changeset/261117
     13
    1142020-05-04  Darin Adler  <darin@apple.com>
    215
  • trunk/Source/WebKit/Shared/UserInterfaceIdiom.mm

    r261117 r261135  
    2929#if PLATFORM(IOS_FAMILY)
    3030
    31 #import "UIKitSPI.h"
    32 #import <WebCore/Device.h>
     31#if USE(APPLE_INTERNAL_SDK)
     32#import <UIKit/UIDevice_Private.h>
     33#else
     34#import <UIKit/UIDevice.h>
     35#endif
    3336
    3437namespace WebKit {
     
    4245static UserInterfaceIdiomState userInterfaceIdiomIsPadState = UserInterfaceIdiomState::Unknown;
    4346
     47#if PLATFORM(IOS_FAMILY)
    4448static inline bool userInterfaceIdiomIsPad()
    4549{
    46     // If we are in a dameon, we cannot use UIDevice. Fall back to checking the hardware itself.
    47     // Since daemons don't ever run in an iPhone-app-on-iPad jail, this will be accurate in the daemon case,
    48     // but is not sufficient in the application case.
    49     if (![UIApplication sharedApplication])
    50         return WebCore::deviceClass() == MGDeviceClassiPad;
    51 
    5250    // This inline function exists to thwart unreachable code
    5351    // detection on platforms where UICurrentUserInterfaceIdiomIsPad
     
    5957#endif
    6058}
     59#endif
    6160
    6261bool currentUserInterfaceIdiomIsPad()
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm

    r261117 r261135  
    2828
    2929#import "APIPageConfiguration.h"
    30 #import "UserInterfaceIdiom.h"
    3130#import "VersionChecks.h"
    3231#import "WKPreferences.h"
     
    194193    _allowsPictureInPictureMediaPlayback = YES;
    195194#endif
    196     _allowsInlineMediaPlayback = WebKit::currentUserInterfaceIdiomIsPad();
     195    _allowsInlineMediaPlayback = WebCore::deviceClass() == MGDeviceClassiPad;
    197196    _inlineMediaPlaybackRequiresPlaysInlineAttribute = !_allowsInlineMediaPlayback;
    198197    _allowsInlineMediaPlaybackAfterFullscreen = !_allowsInlineMediaPlayback;
Note: See TracChangeset for help on using the changeset viewer.