Title: [265215] trunk/Source
Revision
265215
Author
pvol...@apple.com
Date
2020-08-03 13:59:41 -0700 (Mon, 03 Aug 2020)

Log Message

Finalize the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=215095
<rdar://problem/66034080>

Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

Declare constants for MobileGestalt questions.

* pal/spi/ios/MobileGestaltSPI.h:

Source/WebKit:

When the MobileGestalt cache is invalid, we issue a temporary extension to the MobileGestalt daemon for the WebContent process,
which will populate the in-memory cache by doing a set of MobileGestalt queries before revoking the extension. This patch
finalizes the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process on iOS before
revoking the temporary extension to com.apple.mobilegestalt.xpc. This list was compiled by querying every possible MobileGestalt
key after the temporary extension was revoked, and make a note of all queries that were contacting the MobileGestalt daemon to
get the answer. The added queries in this patch should make the list complete, and ensures that all cachable values are in the
in-memory cache before revoking the extension, since every possible MobileGestalt query was tested. This again means that users
that have an invalid MobileGestalt cache, will have access to the exact same MobileGestalt values, as those users who have a
valid MobileGestalt cache.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (265214 => 265215)


--- trunk/Source/WebCore/PAL/ChangeLog	2020-08-03 20:45:49 UTC (rev 265214)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-08-03 20:59:41 UTC (rev 265215)
@@ -1,3 +1,15 @@
+2020-08-03  Per Arne Vollan  <pvol...@apple.com>
+
+        Finalize the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process
+        https://bugs.webkit.org/show_bug.cgi?id=215095
+        <rdar://problem/66034080>
+
+        Reviewed by Geoffrey Garen.
+
+        Declare constants for MobileGestalt questions.
+
+        * pal/spi/ios/MobileGestaltSPI.h:
+
 2020-07-31  Per Arne Vollan  <pvol...@apple.com>
 
         [iOS] Issue a temporary extension to the MobileGestalt daemon when the MobileGestalt cache is invalid

Modified: trunk/Source/WebCore/PAL/pal/spi/ios/MobileGestaltSPI.h (265214 => 265215)


--- trunk/Source/WebCore/PAL/pal/spi/ios/MobileGestaltSPI.h	2020-08-03 20:45:49 UTC (rev 265214)
+++ trunk/Source/WebCore/PAL/pal/spi/ios/MobileGestaltSPI.h	2020-08-03 20:59:41 UTC (rev 265215)
@@ -46,6 +46,14 @@
 static const CFStringRef kMGQDeviceClassNumber = CFSTR("DeviceClassNumber");
 static const CFStringRef kMGQHasExtendedColorDisplay = CFSTR("HasExtendedColorDisplay");
 static const CFStringRef kMGQDeviceCornerRadius = CFSTR("DeviceCornerRadius");
+static const CFStringRef kMGQMainScreenStaticInfo CFSTR("MainScreenStaticInfo");
+static const CFStringRef kMGQSupportsForceTouch CFSTR("eQd5mlz0BN0amTp/2ccMoA");
+static const CFStringRef kMGQBluetoothCapability CFSTR("bluetooth");
+static const CFStringRef kMGQDeviceProximityCapability CFSTR("DeviceProximityCapability");
+static const CFStringRef kMGQDeviceSupportsARKit CFSTR("arkit");
+static const CFStringRef kMGQTimeSyncCapability CFSTR("LJ8aZhTg8lXUeVxHzT+hMw");
+static const CFStringRef kMGQWAPICapability CFSTR("wapi");
+static const CFStringRef kMGQMainDisplayRotation CFSTR("MainDisplayRotation");
 
 typedef enum {
     MGDeviceClassInvalid = -1,

Modified: trunk/Source/WebKit/ChangeLog (265214 => 265215)


--- trunk/Source/WebKit/ChangeLog	2020-08-03 20:45:49 UTC (rev 265214)
+++ trunk/Source/WebKit/ChangeLog	2020-08-03 20:59:41 UTC (rev 265215)
@@ -1,3 +1,24 @@
+2020-08-03  Per Arne Vollan  <pvol...@apple.com>
+
+        Finalize the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process
+        https://bugs.webkit.org/show_bug.cgi?id=215095
+        <rdar://problem/66034080>
+
+        Reviewed by Geoffrey Garen.
+
+        When the MobileGestalt cache is invalid, we issue a temporary extension to the MobileGestalt daemon for the WebContent process,
+        which will populate the in-memory cache by doing a set of MobileGestalt queries before revoking the extension. This patch
+        finalizes the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process on iOS before
+        revoking the temporary extension to com.apple.mobilegestalt.xpc. This list was compiled by querying every possible MobileGestalt
+        key after the temporary extension was revoked, and make a note of all queries that were contacting the MobileGestalt daemon to
+        get the answer. The added queries in this patch should make the list complete, and ensures that all cachable values are in the
+        in-memory cache before revoking the extension, since every possible MobileGestalt query was tested. This again means that users
+        that have an invalid MobileGestalt cache, will have access to the exact same MobileGestalt values, as those users who have a
+        valid MobileGestalt cache.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
 2020-08-03  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [iOS 14] editing/selection/ios/select-all-non-editable-text-using-keyboard.html sometimes times out

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (265214 => 265215)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-08-03 20:45:49 UTC (rev 265214)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-08-03 20:59:41 UTC (rev 265215)
@@ -217,6 +217,14 @@
             MGGetSInt32Answer(kMGQDeviceClassNumber, MGDeviceClassInvalid);
             MGGetBoolAnswer(kMGQHasExtendedColorDisplay);
             MGGetFloat32Answer(kMGQDeviceCornerRadius, 0);
+            MGGetBoolAnswer(kMGQSupportsForceTouch);
+
+            auto answer = adoptCF(MGCopyAnswer(kMGQBluetoothCapability, nullptr));
+            answer = MGCopyAnswer(kMGQDeviceProximityCapability, nullptr);
+            answer = MGCopyAnswer(kMGQDeviceSupportsARKit, nullptr);
+            answer = MGCopyAnswer(kMGQTimeSyncCapability, nullptr);
+            answer = MGCopyAnswer(kMGQWAPICapability, nullptr);
+            answer = MGCopyAnswer(kMGQMainDisplayRotation, nullptr);
 #endif
             ok = extension->revoke();
             ASSERT_UNUSED(ok, ok);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to