Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: third_party/WebKit/Source/core/dom/DOMURL.h

Issue 1860623002: Add support for URL.searchParams getter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restrict .searchParams to URL only Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/DOMURL.h
diff --git a/third_party/WebKit/Source/core/dom/DOMURL.h b/third_party/WebKit/Source/core/dom/DOMURL.h
index a5d11bd2b95d7c62bae73337123f13c5df32aef2..89b2bad7b19d458654cf62e8e531e09c18756642 100644
--- a/third_party/WebKit/Source/core/dom/DOMURL.h
+++ b/third_party/WebKit/Source/core/dom/DOMURL.h
@@ -40,6 +40,7 @@ class Blob;
class ExceptionState;
class ExecutionContext;
class URLRegistrable;
+class URLSearchParams;
class DOMURL final : public GarbageCollectedFinalized<DOMURL>, public ScriptWrappable, public DOMURLUtils {
DEFINE_WRAPPERTYPEINFO();
@@ -48,6 +49,7 @@ public:
{
return new DOMURL(url, blankURL(), exceptionState);
}
+
static DOMURL* create(const String& url, const String& base, ExceptionState& exceptionState)
{
return new DOMURL(url, KURL(KURL(), base), exceptionState);
@@ -65,13 +67,22 @@ public:
String input() const override { return m_input; }
void setInput(const String&) override;
- DEFINE_INLINE_TRACE() { }
+ void setSearch(const String&) override;
+
+ URLSearchParams* searchParams();
+
+ DECLARE_VIRTUAL_TRACE();
private:
+ friend class URLSearchParams;
DOMURL(const String& url, const KURL& base, ExceptionState&);
+ void update();
+ void updateSearchParams(const String&);
+
KURL m_url;
String m_input;
+ WeakMember<URLSearchParams> m_searchParams;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698