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

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: rebased 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..4587cb14d8cac439704cdaadca2f580ddfeda8e8 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,10 +49,12 @@ 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);
}
+ ~DOMURL();
static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&);
static void revokeObjectURL(ExecutionContext*, const String&);
@@ -65,13 +68,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