Move URL from WebCore to WTF
[WebKit-https.git] / Source / WebCore / html / URLSearchParams.cpp
index 30e8592..4e7fbae 100644 (file)
 #include "URLSearchParams.h"
 
 #include "DOMURL.h"
-#include "URLParser.h"
+#include <wtf/URLParser.h>
 
 namespace WebCore {
 
 URLSearchParams::URLSearchParams(const String& init, DOMURL* associatedURL)
     : m_associatedURL(associatedURL)
-    , m_pairs(init.startsWith('?') ? URLParser::parseURLEncodedForm(StringView(init).substring(1)) : URLParser::parseURLEncodedForm(init))
+    , m_pairs(init.startsWith('?') ? WTF::URLParser::parseURLEncodedForm(StringView(init).substring(1)) : WTF::URLParser::parseURLEncodedForm(init))
 {
 }
 
@@ -133,20 +133,20 @@ void URLSearchParams::remove(const String& name)
 
 String URLSearchParams::toString() const
 {
-    return URLParser::serialize(m_pairs);
+    return WTF::URLParser::serialize(m_pairs);
 }
 
 void URLSearchParams::updateURL()
 {
     if (m_associatedURL)
-        m_associatedURL->setQuery(URLParser::serialize(m_pairs));
+        m_associatedURL->setQuery(WTF::URLParser::serialize(m_pairs));
 }
 
 void URLSearchParams::updateFromAssociatedURL()
 {
     ASSERT(m_associatedURL);
     String search = m_associatedURL->search();
-    m_pairs = search.startsWith('?') ? URLParser::parseURLEncodedForm(StringView(search).substring(1)) : URLParser::parseURLEncodedForm(search);
+    m_pairs = search.startsWith('?') ? WTF::URLParser::parseURLEncodedForm(StringView(search).substring(1)) : WTF::URLParser::parseURLEncodedForm(search);
 }
 
 std::optional<WTF::KeyValuePair<String, String>> URLSearchParams::Iterator::next()