Title: [156048] trunk/Tools
Revision
156048
Author
commit-qu...@webkit.org
Date
2013-09-18 10:21:56 -0700 (Wed, 18 Sep 2013)

Log Message

Improved WinLauncher's URL handling.
https://bugs.webkit.org/show_bug.cgi?id=121535

Patch by Alex Christensen <achristen...@webkit.org> on 2013-09-18
Reviewed by Brent Fulgham.

* WinLauncher/WinLauncher.cpp:
(EditProc):
Use INTERNET_MAX_URL_LENGTH instead of our MAX_URL_LENGTH.
(loadURL):
Prepend "http://" to URLs with no scheme.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (156047 => 156048)


--- trunk/Tools/ChangeLog	2013-09-18 17:14:02 UTC (rev 156047)
+++ trunk/Tools/ChangeLog	2013-09-18 17:21:56 UTC (rev 156048)
@@ -1,3 +1,16 @@
+2013-09-18  Alex Christensen  <achristen...@webkit.org>
+
+        Improved WinLauncher's URL handling.
+        https://bugs.webkit.org/show_bug.cgi?id=121535
+
+        Reviewed by Brent Fulgham.
+
+        * WinLauncher/WinLauncher.cpp:
+        (EditProc):
+        Use INTERNET_MAX_URL_LENGTH instead of our MAX_URL_LENGTH.
+        (loadURL):
+        Prepend "http://" to URLs with no scheme.
+
 2013-09-18  Filip Pizlo  <fpi...@apple.com>
 
         DFG should support Int52 for local variables

Modified: trunk/Tools/WinLauncher/WinLauncher.cpp (156047 => 156048)


--- trunk/Tools/WinLauncher/WinLauncher.cpp	2013-09-18 17:14:02 UTC (rev 156047)
+++ trunk/Tools/WinLauncher/WinLauncher.cpp	2013-09-18 17:21:56 UTC (rev 156048)
@@ -871,15 +871,13 @@
     return 0;
 }
 
-#define MAX_URL_LENGTH  1024
-
 LRESULT CALLBACK EditProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 {
     switch (message) {
     case WM_CHAR:
         if (wParam == 13) { // Enter Key
-            wchar_t strPtr[MAX_URL_LENGTH];
-            *((LPWORD)strPtr) = MAX_URL_LENGTH; 
+            wchar_t strPtr[INTERNET_MAX_URL_LENGTH];
+            *((LPWORD)strPtr) = INTERNET_MAX_URL_LENGTH; 
             int strLen = SendMessage(hDlg, EM_GETLINE, 0, (LPARAM)strPtr);
 
             strPtr[strLen] = 0;
@@ -953,7 +951,7 @@
     if (FAILED(hr))
         return;
 
-    hr = request->initWithURL(urlBStr, WebURLRequestUseProtocolCachePolicy, 60);
+    hr = request->initWithURL(wcsstr(urlBStr, L"://") ? urlBStr : _bstr_t(L"http://") + urlBStr, WebURLRequestUseProtocolCachePolicy, 60);
     if (FAILED(hr))
         return;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to