2006-10-08 Anders Carlsson <acarlsson@apple.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Oct 2006 21:40:01 +0000 (21:40 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Oct 2006 21:40:01 +0000 (21:40 +0000)
        Reviewed by Darin.

        * loader/loader.cpp:
        Remove DeprecatedStringList.h include.

        * page/Frame.cpp:
        (WebCore::Frame::submitForm):
        Don't remove "attach" from mailto URLs, we don't do it anywhere else.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16893 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/loader.cpp
WebCore/page/Frame.cpp

index 0feccbefc0507ea6e4b3b5377ffb954b0dc124d2..93b1c03c1d47e8a67ad151b8a981b7d98aadbc10 100644 (file)
@@ -1,3 +1,14 @@
+2006-10-08  Anders Carlsson  <acarlsson@apple.com>
+
+        Reviewed by Darin.
+
+        * loader/loader.cpp:
+        Remove DeprecatedStringList.h include.
+        
+        * page/Frame.cpp:
+        (WebCore::Frame::submitForm):
+        Don't remove "attach" from mailto URLs, we don't do it anywhere else.
+
 2006-10-08  Sam Weinig  <sam.weinig@gmail.com>
 
         Reviewed by Darin.
index adc30143571c13fd190ac4235962e49d412b7805..b9628870e86219f1aabecc61c4473260ac836d6a 100644 (file)
@@ -32,7 +32,6 @@
 #include "Cache.h"
 #include "CachedImage.h"
 #include "CachedResource.h"
-#include "DeprecatedStringList.h"
 #include "DocLoader.h"
 #include "Frame.h"
 #include "HTMLDocument.h"
index bd14bd7571fee97198ec8a837c05abd60488aec1..92e9e80e401093c76814ddbfcdd897a46f96b3c7 100644 (file)
@@ -35,7 +35,6 @@
 #include "CSSPropertyNames.h"
 #include "Cache.h"
 #include "CachedCSSStyleSheet.h"
-#include "DeprecatedStringList.h"
 #include "DOMImplementation.h"
 #include "DOMWindow.h"
 #include "Decoder.h"
@@ -1616,22 +1615,6 @@ void Frame::submitForm(const char *action, const String& url, const FormData& fo
 
   // Handle mailto: forms
   if (u.protocol() == "mailto") {
-      // 1)  Check for attach= and strip it
-      DeprecatedString q = u.query().mid(1);
-      DeprecatedStringList nvps = DeprecatedStringList::split("&", q);
-      bool triedToAttach = false;
-
-      for (DeprecatedStringList::Iterator nvp = nvps.begin(); nvp != nvps.end(); ++nvp) {
-         DeprecatedStringList pair = DeprecatedStringList::split("=", *nvp);
-         if (pair.count() >= 2) {
-            if (pair.first().lower() == "attach") {
-               nvp = nvps.remove(nvp);
-               triedToAttach = true;
-            }
-         }
-      }
-
-
       // 2)  Append body=
       DeprecatedString bodyEnc;
       if (contentType.lower() == "multipart/form-data")
@@ -1647,9 +1630,12 @@ void Frame::submitForm(const char *action, const String& url, const FormData& fo
       } else
          bodyEnc = KURL::encode_string(formData.flattenToString().deprecatedString());
 
-      nvps.append(String::sprintf("body=%s", bodyEnc.latin1()).deprecatedString());
-      q = nvps.join("&");
-      u.setQuery(q);
+      DeprecatedString query = u.query();
+      if (!query.isEmpty())
+          query += '&';
+      query += String::sprintf("&body=%s", bodyEnc.latin1()).deprecatedString();
+      
+      u.setQuery(query);
   } 
 
   if (strcmp(action, "get") == 0) {