WebKit Bugzilla
Attachment 358863 Details for
Bug 193345
: MiniBrowser should be able to navigate to about:blank
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
mini-2.patch (text/plain), 2.92 KB, created by
Joseph Pecoraro
on 2019-01-10 19:23:12 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-01-10 19:23:12 PST
Size:
2.92 KB
patch
obsolete
>diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 392c7e6de5f..749f9502dfd 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-10 Joseph Pecoraro <pecoraro@apple.com> >+ >+ MiniBrowser should be able to navigate to about:blank >+ https://bugs.webkit.org/show_bug.cgi?id=193345 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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 <pecoraro@apple.com> > > Remove MiniBrowser custom "Process Swap" menu item which does not work >diff --git a/Tools/MiniBrowser/mac/BrowserWindowController.m b/Tools/MiniBrowser/mac/BrowserWindowController.m >index 2817dab8144..4b99057a03c 100644 >--- a/Tools/MiniBrowser/mac/BrowserWindowController.m >+++ b/Tools/MiniBrowser/mac/BrowserWindowController.m >@@ -65,6 +65,9 @@ - (NSString *)addProtocolIfNecessary:(NSString *)address > if ([address hasPrefix:@"data:"]) > return address; > >+ if ([address hasPrefix:@"about:"]) >+ return address; >+ > return [@"http://" stringByAppendingString:address]; > } > >diff --git a/Tools/MiniBrowser/mac/WK1BrowserWindowController.m b/Tools/MiniBrowser/mac/WK1BrowserWindowController.m >index 384c791e5c0..62094d9bc10 100644 >--- a/Tools/MiniBrowser/mac/WK1BrowserWindowController.m >+++ b/Tools/MiniBrowser/mac/WK1BrowserWindowController.m >@@ -90,7 +90,7 @@ - (void)loadHTMLString:(NSString *)HTMLString > > - (IBAction)fetch:(id)sender > { >- [urlText setStringValue:[self addProtocolIfNecessary:[urlText stringValue]]]; >+ [urlText setStringValue:[self addProtocolIfNecessary:urlText.stringValue]]; > NSURL *url = [NSURL _webkit_URLWithUserTypedString:urlText.stringValue]; > [[_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:url]]; > } >diff --git a/Tools/MiniBrowser/mac/WK2BrowserWindowController.m b/Tools/MiniBrowser/mac/WK2BrowserWindowController.m >index 3e739d7c915..3d3b7f3fdbe 100644 >--- a/Tools/MiniBrowser/mac/WK2BrowserWindowController.m >+++ b/Tools/MiniBrowser/mac/WK2BrowserWindowController.m >@@ -135,9 +135,9 @@ - (void)dealloc > > - (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 = [NSURL _webkit_URLWithUserTypedString:urlText.stringValue]; >+ [_webView loadRequest:[NSURLRequest requestWithURL:url]]; > } > > - (IBAction)setPageScale:(id)sender
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193345
:
358862
| 358863