Title: [287895] trunk/Source/WebKit
Revision
287895
Author
[email protected]
Date
2022-01-11 13:57:15 -0800 (Tue, 11 Jan 2022)

Log Message

[Cocoa] Inspector Extensions: tabIconURLs with custom scheme URLs are incorrectly loaded
https://bugs.webkit.org/show_bug.cgi?id=235045
<rdar://problem/87357027>

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/_WKInspectorExtension.mm:
(-[_WKInspectorExtension createTabWithName:tabIconURL:sourceURL:completionHandler:]):
Construct a WTF::URL from the .baseURL and the .relativePath of the NSURL.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (287894 => 287895)


--- trunk/Source/WebKit/ChangeLog	2022-01-11 21:49:02 UTC (rev 287894)
+++ trunk/Source/WebKit/ChangeLog	2022-01-11 21:57:15 UTC (rev 287895)
@@ -1,3 +1,15 @@
+2022-01-11  BJ Burg  <[email protected]>
+
+        [Cocoa] Inspector Extensions: tabIconURLs with custom scheme URLs are incorrectly loaded
+        https://bugs.webkit.org/show_bug.cgi?id=235045
+        <rdar://problem/87357027>
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/API/Cocoa/_WKInspectorExtension.mm:
+        (-[_WKInspectorExtension createTabWithName:tabIconURL:sourceURL:completionHandler:]):
+        Construct a WTF::URL from the .baseURL and the .relativePath of the NSURL.
+
 2022-01-11  Adrian Perez de Castro  <[email protected]>
 
         Non-unified build fixes, early January 2022 edition

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm (287894 => 287895)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm	2022-01-11 21:49:02 UTC (rev 287894)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm	2022-01-11 21:57:15 UTC (rev 287895)
@@ -72,7 +72,7 @@
 
 - (void)createTabWithName:(NSString *)tabName tabIconURL:(NSURL *)tabIconURL sourceURL:(NSURL *)sourceURL completionHandler:(void(^)(NSError *, NSString *))completionHandler
 {
-    _extension->createTab(tabName, tabIconURL, sourceURL, [protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected<Inspector::ExtensionTabID, Inspector::ExtensionError> result) mutable {
+    _extension->createTab(tabName, { tabIconURL.baseURL, tabIconURL.relativeString }, { tabIconURL.baseURL, sourceURL.relativeString }, [protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected<Inspector::ExtensionTabID, Inspector::ExtensionError> result) mutable {
         if (!result) {
             capturedBlock([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:@{ NSLocalizedFailureReasonErrorKey: Inspector::extensionErrorToString(result.error())}], nil);
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to