Changeset 248471 in webkit


Ignore:
Timestamp:
Aug 9, 2019 1:20:49 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Disable CSSOM View Scrolling API for IMDb iOS app
https://bugs.webkit.org/show_bug.cgi?id=200586
<rdar://problem/53645833>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-09
Reviewed by Simon Fraser.

Source/WebCore:

They are calling scrollHeight on the HTML element and it is running new code introduced in r235806
Disable this new feature until they update their app to use the iOS13 SDK.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isIMDb):

Source/WebKit:

Change the CSSOMViewScrollingAPIEnabled default value to be off for the IMDb app's WKWebViews.
I manually verified this is effective in those WKWebViews but no other WKWebViews and that it fixes the radar.

  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCSSOMViewScrollingAPIEnabled):

  • Shared/WebPreferencesDefaultValues.h:
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r248467 r248471  
     12019-08-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable CSSOM View Scrolling API for IMDb iOS app
     4        https://bugs.webkit.org/show_bug.cgi?id=200586
     5        <rdar://problem/53645833>
     6
     7        Reviewed by Simon Fraser.
     8
     9        They are calling scrollHeight on the HTML element and it is running new code introduced in r235806
     10        Disable this new feature until they update their app to use the iOS13 SDK.
     11
     12        * platform/RuntimeApplicationChecks.h:
     13        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
     14        (WebCore::IOSApplication::isIMDb):
     15
    1162019-08-09  Youenn Fablet  <youenn@apple.com>
    217
  • trunk/Source/WebCore/platform/RuntimeApplicationChecks.h

    r246664 r248471  
    4444
    4545WEBCORE_EXPORT void setApplicationSDKVersion(uint32_t);
    46 uint32_t applicationSDKVersion();
     46WEBCORE_EXPORT uint32_t applicationSDKVersion();
    4747
    4848WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&);
     
    7979WEBCORE_EXPORT bool isMobileMail();
    8080WEBCORE_EXPORT bool isMobileSafari();
     81WEBCORE_EXPORT bool isIMDb();
    8182WEBCORE_EXPORT bool isWebBookmarksD();
    8283WEBCORE_EXPORT bool isDumpRenderTree();
  • trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm

    r246664 r248471  
    209209}
    210210
     211bool IOSApplication::isIMDb()
     212{
     213    static bool isIMDb = applicationBundleIsEqualTo("com.imdb.imdb"_s);
     214    return isIMDb;
     215}
     216
    211217bool IOSApplication::isWebBookmarksD()
    212218{
  • trunk/Source/WebKit/ChangeLog

    r248469 r248471  
     12019-08-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable CSSOM View Scrolling API for IMDb iOS app
     4        https://bugs.webkit.org/show_bug.cgi?id=200586
     5        <rdar://problem/53645833>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Change the CSSOMViewScrollingAPIEnabled default value to be off for the IMDb app's WKWebViews.
     10        I manually verified this is effective in those WKWebViews but no other WKWebViews and that it fixes the radar.
     11
     12        * Shared/WebPreferences.yaml:
     13        * Shared/WebPreferencesDefaultValues.cpp:
     14        (WebKit::defaultCSSOMViewScrollingAPIEnabled):
     15        * Shared/WebPreferencesDefaultValues.h:
     16
    1172019-08-09  Tim Horton  <timothy_horton@apple.com>
    218
  • trunk/Source/WebKit/Shared/WebPreferences.yaml

    r248409 r248471  
    12851285CSSOMViewScrollingAPIEnabled:
    12861286  type: bool
    1287   defaultValue: true
     1287  defaultValue: defaultCSSOMViewScrollingAPIEnabled()
    12881288  humanReadableName: "CSSOM View Scrolling API"
    12891289  humanReadableDescription: "Implement standard behavior for scrollLeft, scrollTop, scrollWidth, scrollHeight, scrollTo, scrollBy and scrollingElement."
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

    r246892 r248471  
    6262}
    6363
     64bool defaultCSSOMViewScrollingAPIEnabled()
     65{
     66#if PLATFORM(IOS_FAMILY)
     67    if (WebCore::IOSApplication::isIMDb() && applicationSDKVersion() < DYLD_IOS_VERSION_13_0)
     68        return false;
     69#endif
     70    return true;
     71}
     72
    6473#if ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
    6574
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h

    r246148 r248471  
    281281bool defaultPassiveTouchListenersAsDefaultOnDocument();
    282282bool defaultCustomPasteboardDataEnabled();
     283bool defaultCSSOMViewScrollingAPIEnabled();
    283284
    284285#if ENABLE(TEXT_AUTOSIZING)
Note: See TracChangeset for help on using the changeset viewer.