Title: [239856] trunk/Tools
Revision
239856
Author
commit-qu...@webkit.org
Date
2019-01-10 20:39:23 -0800 (Thu, 10 Jan 2019)

Log Message

MiniBrowser should be able to navigate to about:blank
https://bugs.webkit.org/show_bug.cgi?id=193345

Patch by Joseph Pecoraro <pecor...@apple.com> on 2019-01-10
Reviewed by Simon Fraser.

* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController addProtocolIfNecessary:]):
Don't prepend "http://" to "about:" prefixed URLs like "about:blank".

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController fetch:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController fetch:]):
Clean up the code that uses this to match style.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (239855 => 239856)


--- trunk/Tools/ChangeLog	2019-01-11 04:38:04 UTC (rev 239855)
+++ trunk/Tools/ChangeLog	2019-01-11 04:39:23 UTC (rev 239856)
@@ -1,5 +1,22 @@
 2019-01-10  Joseph Pecoraro  <pecor...@apple.com>
 
+        MiniBrowser should be able to navigate to about:blank
+        https://bugs.webkit.org/show_bug.cgi?id=193345
+
+        Reviewed by Simon Fraser.
+
+        * MiniBrowser/mac/BrowserWindowController.m:
+        (-[BrowserWindowController addProtocolIfNecessary:]):
+        Don't prepend "http://" to "about:" prefixed URLs like "about:blank".
+
+        * MiniBrowser/mac/WK1BrowserWindowController.m:
+        (-[WK1BrowserWindowController fetch:]):
+        * MiniBrowser/mac/WK2BrowserWindowController.m:
+        (-[WK2BrowserWindowController fetch:]):
+        Clean up the code that uses this to match style.
+
+2019-01-10  Joseph Pecoraro  <pecor...@apple.com>
+
         Remove MiniBrowser custom "Process Swap" menu item which does not work
         https://bugs.webkit.org/show_bug.cgi?id=193344
 

Modified: trunk/Tools/MiniBrowser/mac/BrowserWindowController.m (239855 => 239856)


--- trunk/Tools/MiniBrowser/mac/BrowserWindowController.m	2019-01-11 04:38:04 UTC (rev 239855)
+++ trunk/Tools/MiniBrowser/mac/BrowserWindowController.m	2019-01-11 04:39:23 UTC (rev 239856)
@@ -65,6 +65,9 @@
     if ([address hasPrefix:@"data:"])
         return address;
 
+    if ([address hasPrefix:@"about:"])
+        return address;
+
     return [@"http://" stringByAppendingString:address];
 }
 

Modified: trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m (239855 => 239856)


--- trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m	2019-01-11 04:38:04 UTC (rev 239855)
+++ trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m	2019-01-11 04:39:23 UTC (rev 239856)
@@ -90,7 +90,7 @@
 
 - (IBAction)fetch:(id)sender
 {
-    [urlText setStringValue:[self addProtocolIfNecessary:[urlText stringValue]]];
+    [urlText setStringValue:[self addProtocolIfNecessary:urlText.stringValue]];
     NSURL *url = "" _webkit_URLWithUserTypedString:urlText.stringValue];
     [[_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:url]];
 }

Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (239855 => 239856)


--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m	2019-01-11 04:38:04 UTC (rev 239855)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m	2019-01-11 04:39:23 UTC (rev 239856)
@@ -135,9 +135,9 @@
 
 - (IBAction)fetch:(id)sender
 {
-    [urlText setStringValue:[self addProtocolIfNecessary:[urlText stringValue]]];
-
-    [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL _webkit_URLWithUserTypedString:[urlText stringValue]]]];
+    [urlText setStringValue:[self addProtocolIfNecessary:urlText.stringValue]];
+    NSURL *url = "" _webkit_URLWithUserTypedString:urlText.stringValue];
+    [_webView loadRequest:[NSURLRequest requestWithURL:url]];
 }
 
 - (IBAction)setPageScale:(id)sender
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to