Title: [281825] trunk/Source/WebKit
Revision
281825
Author
[email protected]
Date
2021-08-31 15:08:04 -0700 (Tue, 31 Aug 2021)

Log Message

[iOS] Move the implementation of -[WKWebView _dynamicUserInterfaceTraitDidChange] out of the testing category
https://bugs.webkit.org/show_bug.cgi?id=229735

Reviewed by Tim Horton.

r253465 incorrectly moved -[WKWebView _dynamicUserInterfaceTraitDidChange]
into the WKTestingIOS category. _dynamicUserInterfaceTraitDidChange is used
to respond to trait collection changes that affect dynamic colors, and is
not a testing only method. Consequently, the method should be implemented
in the WKViewInternalIOS category.

* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _dynamicUserInterfaceTraitDidChange]):
* UIProcess/API/ios/WKWebViewTestingIOS.mm:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (281824 => 281825)


--- trunk/Source/WebKit/ChangeLog	2021-08-31 21:57:15 UTC (rev 281824)
+++ trunk/Source/WebKit/ChangeLog	2021-08-31 22:08:04 UTC (rev 281825)
@@ -1,3 +1,20 @@
+2021-08-31  Aditya Keerthi  <[email protected]>
+
+        [iOS] Move the implementation of -[WKWebView _dynamicUserInterfaceTraitDidChange] out of the testing category
+        https://bugs.webkit.org/show_bug.cgi?id=229735
+
+        Reviewed by Tim Horton.
+
+        r253465 incorrectly moved -[WKWebView _dynamicUserInterfaceTraitDidChange]
+        into the WKTestingIOS category. _dynamicUserInterfaceTraitDidChange is used
+        to respond to trait collection changes that affect dynamic colors, and is
+        not a testing only method. Consequently, the method should be implemented
+        in the WKViewInternalIOS category.
+
+        * UIProcess/API/ios/WKWebViewIOS.mm:
+        (-[WKWebView _dynamicUserInterfaceTraitDidChange]):
+        * UIProcess/API/ios/WKWebViewTestingIOS.mm:
+
 2021-08-31  Sihui Liu  <[email protected]>
 
         REGRESSION (r281771): ASSERTION FAILED: !m_deletionHasBegun under WebCore::Permissions::~Permissions()

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (281824 => 281825)


--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2021-08-31 21:57:15 UTC (rev 281824)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2021-08-31 22:08:04 UTC (rev 281825)
@@ -244,6 +244,14 @@
     return deviceOrientationForUIInterfaceOrientation(orientation);
 }
 
+- (void)_dynamicUserInterfaceTraitDidChange
+{
+    if (!_page)
+        return;
+    _page->effectiveAppearanceDidChange();
+    [self _updateScrollViewBackground];
+}
+
 - (BOOL)_effectiveAppearanceIsDark
 {
     return self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark;

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm (281824 => 281825)


--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm	2021-08-31 21:57:15 UTC (rev 281824)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm	2021-08-31 22:08:04 UTC (rev 281825)
@@ -433,14 +433,6 @@
     [_contentView _simulateTextEntered:text];
 }
 
-- (void)_dynamicUserInterfaceTraitDidChange
-{
-    if (!_page)
-        return;
-    _page->effectiveAppearanceDidChange();
-    [self _updateScrollViewBackground];
-}
-
 - (void)_triggerSystemPreviewActionOnElement:(uint64_t)elementID document:(uint64_t)documentID page:(uint64_t)pageID
 {
 #if USE(SYSTEM_PREVIEW)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to