Title: [293410] trunk
Revision
293410
Author
[email protected]
Date
2022-04-25 21:49:09 -0700 (Mon, 25 Apr 2022)

Log Message

[iOS] Add NSCoding support for findInteractionEnabled
https://bugs.webkit.org/show_bug.cgi?id=239733
rdar://87850648

Reviewed by Wenson Hsieh.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithCoder:]):
(-[WKWebView encodeWithCoder:]):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/Coding.mm:
(TEST):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (293409 => 293410)


--- trunk/Source/WebKit/ChangeLog	2022-04-26 04:07:01 UTC (rev 293409)
+++ trunk/Source/WebKit/ChangeLog	2022-04-26 04:49:09 UTC (rev 293410)
@@ -1,3 +1,15 @@
+2022-04-25  Aditya Keerthi  <[email protected]>
+
+        [iOS] Add NSCoding support for findInteractionEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=239733
+        rdar://87850648
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView initWithCoder:]):
+        (-[WKWebView encodeWithCoder:]):
+
 2022-04-21  Elliott Williams  <[email protected]>
 
         [XCBuild] Refactor WebKit resources to emit output tasks for dependency validation

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (293409 => 293410)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2022-04-26 04:07:01 UTC (rev 293409)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2022-04-26 04:49:09 UTC (rev 293410)
@@ -602,6 +602,10 @@
     self.magnification = [coder decodeDoubleForKey:@"magnification"];
 #endif
 
+#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
+    self.findInteractionEnabled = [coder decodeBoolForKey:@"findInteractionEnabled"];
+#endif
+
     return self;
 }
 
@@ -619,6 +623,10 @@
     [coder encodeBool:self.allowsMagnification forKey:@"allowsMagnification"];
     [coder encodeDouble:self.magnification forKey:@"magnification"];
 #endif
+
+#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
+    [coder encodeBool:self.isFindInteractionEnabled forKey:@"findInteractionEnabled"];
+#endif
 }
 
 - (void)dealloc

Modified: trunk/Tools/ChangeLog (293409 => 293410)


--- trunk/Tools/ChangeLog	2022-04-26 04:07:01 UTC (rev 293409)
+++ trunk/Tools/ChangeLog	2022-04-26 04:49:09 UTC (rev 293410)
@@ -1,3 +1,14 @@
+2022-04-25  Aditya Keerthi  <[email protected]>
+
+        [iOS] Add NSCoding support for findInteractionEnabled
+        https://bugs.webkit.org/show_bug.cgi?id=239733
+        rdar://87850648
+
+        Reviewed by Wenson Hsieh.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/Coding.mm:
+        (TEST):
+
 2022-04-25  Jonathan Bedard  <[email protected]>
 
         [Merge-Queue] Differentiate gardening commits in bug comments

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Coding.mm (293409 => 293410)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Coding.mm	2022-04-26 04:07:01 UTC (rev 293409)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Coding.mm	2022-04-26 04:49:09 UTC (rev 293410)
@@ -137,6 +137,9 @@
 
 #if PLATFORM(IOS_FAMILY)
     [a setAllowsLinkPreview:YES];
+#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
+    [a setFindInteractionEnabled:YES];
+#endif
 #else
     [a setAllowsLinkPreview:NO];
     [a setAllowsMagnification:YES];
@@ -153,6 +156,10 @@
     EXPECT_EQ([a allowsMagnification], [b allowsMagnification]);
     EXPECT_EQ([a magnification], [b magnification]);
 #endif
+
+#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
+    EXPECT_EQ([a isFindInteractionEnabled], [b isFindInteractionEnabled]);
+#endif
 }
 
 TEST(Coding, WKWebView_SameConfiguration)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to