Title: [248506] branches/safari-608.1-branch/Source
Revision
248506
Author
bshaf...@apple.com
Date
2019-08-10 20:01:59 -0700 (Sat, 10 Aug 2019)

Log Message

Cherry-pick r248471. rdar://problem/54130628

    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 <achristen...@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:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248471 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608.1-branch/Source/WebCore/ChangeLog (248505 => 248506)


--- branches/safari-608.1-branch/Source/WebCore/ChangeLog	2019-08-11 03:01:56 UTC (rev 248505)
+++ branches/safari-608.1-branch/Source/WebCore/ChangeLog	2019-08-11 03:01:59 UTC (rev 248506)
@@ -1,5 +1,52 @@
 2019-08-10  Babak Shafiei  <bshaf...@apple.com>
 
+        Cherry-pick r248471. rdar://problem/54130628
+
+    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 <achristen...@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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-09  Alex Christensen  <achristen...@webkit.org>
+
+            Disable CSSOM View Scrolling API for IMDb iOS app
+            https://bugs.webkit.org/show_bug.cgi?id=200586
+            <rdar://problem/53645833>
+
+            Reviewed by Simon Fraser.
+
+            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):
+
+2019-08-10  Babak Shafiei  <bshaf...@apple.com>
+
         Cherry-pick r248463. rdar://problem/54139834
 
     REGRESSION (iOS 13): united.com web forms do not respond to taps

Modified: branches/safari-608.1-branch/Source/WebCore/platform/RuntimeApplicationChecks.h (248505 => 248506)


--- branches/safari-608.1-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2019-08-11 03:01:56 UTC (rev 248505)
+++ branches/safari-608.1-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2019-08-11 03:01:59 UTC (rev 248506)
@@ -43,7 +43,7 @@
 bool isInWebProcess();
 
 WEBCORE_EXPORT void setApplicationSDKVersion(uint32_t);
-uint32_t applicationSDKVersion();
+WEBCORE_EXPORT uint32_t applicationSDKVersion();
 
 WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&);
 String applicationBundleIdentifier();
@@ -78,6 +78,7 @@
 
 WEBCORE_EXPORT bool isMobileMail();
 WEBCORE_EXPORT bool isMobileSafari();
+WEBCORE_EXPORT bool isIMDb();
 WEBCORE_EXPORT bool isWebBookmarksD();
 WEBCORE_EXPORT bool isDumpRenderTree();
 bool isMobileStore();

Modified: branches/safari-608.1-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (248505 => 248506)


--- branches/safari-608.1-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2019-08-11 03:01:56 UTC (rev 248505)
+++ branches/safari-608.1-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2019-08-11 03:01:59 UTC (rev 248506)
@@ -208,6 +208,12 @@
     return isMobileSafari;
 }
 
+bool IOSApplication::isIMDb()
+{
+    static bool isIMDb = applicationBundleIsEqualTo("com.imdb.imdb"_s);
+    return isIMDb;
+}
+
 bool IOSApplication::isWebBookmarksD()
 {
     static bool isWebBookmarksD = applicationBundleIsEqualTo("com.apple.webbookmarksd"_s);

Modified: branches/safari-608.1-branch/Source/WebKit/ChangeLog (248505 => 248506)


--- branches/safari-608.1-branch/Source/WebKit/ChangeLog	2019-08-11 03:01:56 UTC (rev 248505)
+++ branches/safari-608.1-branch/Source/WebKit/ChangeLog	2019-08-11 03:01:59 UTC (rev 248506)
@@ -1,5 +1,53 @@
 2019-08-10  Babak Shafiei  <bshaf...@apple.com>
 
+        Cherry-pick r248471. rdar://problem/54130628
+
+    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 <achristen...@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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-09  Alex Christensen  <achristen...@webkit.org>
+
+            Disable CSSOM View Scrolling API for IMDb iOS app
+            https://bugs.webkit.org/show_bug.cgi?id=200586
+            <rdar://problem/53645833>
+
+            Reviewed by Simon Fraser.
+
+            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:
+
+2019-08-10  Babak Shafiei  <bshaf...@apple.com>
+
         Cherry-pick r248469. rdar://problem/54130692
 
     Tapping buttons in Data Detectors lookup previews doesn't work

Modified: branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferences.yaml (248505 => 248506)


--- branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferences.yaml	2019-08-11 03:01:56 UTC (rev 248505)
+++ branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferences.yaml	2019-08-11 03:01:59 UTC (rev 248506)
@@ -1274,7 +1274,7 @@
 
 CSSOMViewScrollingAPIEnabled:
   type: bool
-  defaultValue: true
+  defaultValue: defaultCSSOMViewScrollingAPIEnabled()
   humanReadableName: "CSSOM View Scrolling API"
   humanReadableDescription: "Implement standard behavior for scrollLeft, scrollTop, scrollWidth, scrollHeight, scrollTo, scrollBy and scrollingElement."
   category: internal

Modified: branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (248505 => 248506)


--- branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2019-08-11 03:01:56 UTC (rev 248505)
+++ branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2019-08-11 03:01:59 UTC (rev 248506)
@@ -61,6 +61,15 @@
 #endif
 }
 
+bool defaultCSSOMViewScrollingAPIEnabled()
+{
+#if PLATFORM(IOS_FAMILY)
+    if (WebCore::IOSApplication::isIMDb() && applicationSDKVersion() < DYLD_IOS_VERSION_13_0)
+        return false;
+#endif
+    return true;
+}
+
 #if ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
 
 bool defaultTextAutosizingUsesIdempotentMode()

Modified: branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h (248505 => 248506)


--- branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2019-08-11 03:01:56 UTC (rev 248505)
+++ branches/safari-608.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2019-08-11 03:01:59 UTC (rev 248506)
@@ -280,6 +280,7 @@
 
 bool defaultPassiveTouchListenersAsDefaultOnDocument();
 bool defaultCustomPasteboardDataEnabled();
+bool defaultCSSOMViewScrollingAPIEnabled();
 
 #if ENABLE(TEXT_AUTOSIZING)
 bool defaultTextAutosizingUsesIdempotentMode();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to