Title: [104621] trunk/Tools
Revision
104621
Author
[email protected]
Date
2012-01-10 13:05:59 -0800 (Tue, 10 Jan 2012)

Log Message

Make it possible to type data: URLs into MiniBrowser on Windows

Fixes <http://webkit.org/b/75084> Crash when trying to navigate to a data: URL in
MiniBrowser on Windows

Reviewed by Darin Adler.

* MiniBrowser/win/BrowserWindow.cpp:
(BrowserWindow::handleMessage): Instead of checking for an "http://" prefix when deciding
whether to prepend "http://", just look for whether the typed URL contains a colon. If it
does, we assume it already has a scheme and don't modify it.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (104620 => 104621)


--- trunk/Tools/ChangeLog	2012-01-10 21:01:01 UTC (rev 104620)
+++ trunk/Tools/ChangeLog	2012-01-10 21:05:59 UTC (rev 104621)
@@ -1,5 +1,19 @@
 2012-01-10  Adam Roben  <[email protected]>
 
+        Make it possible to type data: URLs into MiniBrowser on Windows
+
+        Fixes <http://webkit.org/b/75084> Crash when trying to navigate to a data: URL in
+        MiniBrowser on Windows
+
+        Reviewed by Darin Adler.
+
+        * MiniBrowser/win/BrowserWindow.cpp:
+        (BrowserWindow::handleMessage): Instead of checking for an "http://" prefix when deciding
+        whether to prepend "http://", just look for whether the typed URL contains a colon. If it
+        does, we assume it already has a scheme and don't modify it.
+
+2012-01-10  Adam Roben  <[email protected]>
+
         Make MiniBrowser automatically escape invalid URL characters typed in its URL field
 
         Fixes <http://webkit.org/b/75086> Crash when typing a data: URL containing double-quotes in

Modified: trunk/Tools/MiniBrowser/win/BrowserWindow.cpp (104620 => 104621)


--- trunk/Tools/MiniBrowser/win/BrowserWindow.cpp	2012-01-10 21:01:01 UTC (rev 104620)
+++ trunk/Tools/MiniBrowser/win/BrowserWindow.cpp	2012-01-10 21:05:59 UTC (rev 104621)
@@ -251,7 +251,7 @@
 
     std::wstring url(&buffer[0], buffer.size() - 1);
 
-    if (url.find(L"http://"))
+    if (url.find(L":") == std::wstring::npos)
         url = "" + url;
 
     m_browserView.goToURL(url);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to