Bug 1213815 - Update URLSearchParams and URLUtils in webidl files, r=bz
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 23 Nov 2015 20:05:26 +0000
changeset 307991 058e26487efa4bac4d6dd2b5d04e1168f14c735a
parent 307990 596c14e58f1dff574f041fbc627db97ced508b14
child 307992 adc09292d0240b3e5a39e633106545cd00364f4e
push idunknown
push userunknown
push dateunknown
reviewersbz
bugs1213815
milestone45.0a1
Bug 1213815 - Update URLSearchParams and URLUtils in webidl files, r=bz
dom/base/Link.cpp
dom/base/Link.h
dom/base/test/test_urlSearchParams.html
dom/html/HTMLAnchorElement.cpp
dom/html/HTMLAreaElement.cpp
dom/html/HTMLLinkElement.cpp
dom/svg/SVGAElement.cpp
dom/webidl/HTMLAnchorElement.webidl
dom/webidl/HTMLAreaElement.webidl
dom/webidl/HTMLHyperlinkElementUtils.webidl
dom/webidl/Location.webidl
dom/webidl/URL.webidl
dom/webidl/URLUtils.webidl
dom/webidl/URLUtilsReadOnly.webidl
dom/webidl/WorkerLocation.webidl
dom/webidl/moz.build
toolkit/components/places/tests/cpp/mock_Link.h
--- a/dom/base/Link.cpp
+++ b/dom/base/Link.cpp
@@ -212,23 +212,16 @@ Link::SetPathname(const nsAString &aPath
 
   (void)url->SetFilePath(NS_ConvertUTF16toUTF8(aPathname));
   SetHrefAttribute(uri);
 }
 
 void
 Link::SetSearch(const nsAString& aSearch, ErrorResult& aError)
 {
-  SetSearchInternal(aSearch);
-  UpdateURLSearchParams();
-}
-
-void
-Link::SetSearchInternal(const nsAString& aSearch)
-{
   nsCOMPtr<nsIURI> uri(GetURIToMutate());
   nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
   if (!url) {
     // Ignore failures to be compatible with NS4.
     return;
   }
 
   (void)url->SetQuery(NS_ConvertUTF16toUTF8(aSearch));
@@ -477,17 +470,16 @@ Link::ResetLinkState(bool aNotify, bool 
     UnregisterFromHistory();
   }
 
   // If we have an href, we should register with the history.
   mNeedsRegistration = aHasHref;
 
   // If we've cached the URI, reset always invalidates it.
   mCachedURI = nullptr;
-  UpdateURLSearchParams();
 
   // Update our state back to the default.
   mLinkState = defaultState;
 
   // We have to be very careful here: if aNotify is false we do NOT
   // want to call UpdateState, because that will call into LinkState()
   // and try to start off loads, etc.  But ResetLinkState is called
   // with aNotify false when things are in inconsistent states, so
@@ -566,72 +558,10 @@ Link::SizeOfExcludingThis(mozilla::Mallo
 
   // The following members don't need to be measured:
   // - mElement, because it is a pointer-to-self used to avoid QIs
   // - mHistory, because it is non-owning
 
   return n;
 }
 
-URLSearchParams*
-Link::SearchParams()
-{
-  CreateSearchParamsIfNeeded();
-  return mSearchParams;
-}
-
-void
-Link::URLSearchParamsUpdated(URLSearchParams* aSearchParams)
-{
-  MOZ_ASSERT(mSearchParams);
-  MOZ_ASSERT(mSearchParams == aSearchParams);
-
-  nsString search;
-  mSearchParams->Serialize(search);
-  SetSearchInternal(search);
-}
-
-void
-Link::UpdateURLSearchParams()
-{
-  if (!mSearchParams) {
-    return;
-  }
-
-  nsAutoCString search;
-  nsCOMPtr<nsIURI> uri(GetURI());
-  nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
-  if (url) {
-    nsresult rv = url->GetQuery(search);
-    if (NS_FAILED(rv)) {
-      NS_WARNING("Failed to get the query from a nsIURL.");
-    }
-  }
-
-  mSearchParams->ParseInput(search);
-}
-
-void
-Link::CreateSearchParamsIfNeeded()
-{
-  if (!mSearchParams) {
-    mSearchParams = new URLSearchParams(this, this);
-    UpdateURLSearchParams();
-  }
-}
-
-void
-Link::Unlink()
-{
-  if (mSearchParams) {
-    mSearchParams = nullptr;
-  }
-}
-
-void
-Link::Traverse(nsCycleCollectionTraversalCallback &cb)
-{
-  Link* tmp = this;
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSearchParams);
-}
-
 } // namespace dom
 } // namespace mozilla
--- a/dom/base/Link.h
+++ b/dom/base/Link.h
@@ -8,32 +8,31 @@
  * This is the base class for all link classes.
  */
 
 #ifndef mozilla_dom_Link_h__
 #define mozilla_dom_Link_h__
 
 #include "mozilla/IHistory.h"
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/dom/URLSearchParams.h"
 #include "nsIContent.h" // for nsLinkState
 
 namespace mozilla {
 
 class EventStates;
 
 namespace dom {
 
 class Element;
 
 #define MOZILLA_DOM_LINK_IMPLEMENTATION_IID               \
 { 0xb25edee6, 0xdd35, 0x4f8b,                             \
   { 0xab, 0x90, 0x66, 0xd0, 0xbd, 0x3c, 0x22, 0xd5 } }
 
-class Link : public URLSearchParamsObserver
+class Link : public nsISupports
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_LINK_IMPLEMENTATION_IID)
 
   /**
    * aElement is the element pointer corresponding to this link.
    */
   explicit Link(Element* aElement);
@@ -69,17 +68,16 @@ public:
   void GetOrigin(nsAString &aOrigin, ErrorResult& aError);
   void GetProtocol(nsAString &_protocol, ErrorResult& aError);
   void GetUsername(nsAString &aUsername, ErrorResult& aError);
   void GetPassword(nsAString &aPassword, ErrorResult& aError);
   void GetHost(nsAString &_host, ErrorResult& aError);
   void GetHostname(nsAString &_hostname, ErrorResult& aError);
   void GetPathname(nsAString &_pathname, ErrorResult& aError);
   void GetSearch(nsAString &_search, ErrorResult& aError);
-  URLSearchParams* SearchParams();
   void GetPort(nsAString &_port, ErrorResult& aError);
   void GetHash(nsAString &_hash, ErrorResult& aError);
 
   /**
    * Invalidates any link caching, and resets the state to the default.
    *
    * @param aNotify
    *        true if ResetLinkState should notify the owning document about style
@@ -108,19 +106,16 @@ public:
    */
   virtual bool HasDeferredDNSPrefetchRequest() { return true; }
 
   virtual size_t
     SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
   bool ElementHasHref() const;
 
-  // URLSearchParamsObserver
-  void URLSearchParamsUpdated(URLSearchParams* aSearchParams) override;
-
 protected:
   virtual ~Link();
 
   /**
    * Return true if the link has associated URI.
    */
   bool HasURI() const
   {
@@ -129,52 +124,39 @@ protected:
     }
 
     return !!GetURI();
   }
 
   nsIURI* GetCachedURI() const { return mCachedURI; }
   bool HasCachedURI() const { return !!mCachedURI; }
 
-  void UpdateURLSearchParams();
-
-  // CC methods
-  void Unlink();
-  void Traverse(nsCycleCollectionTraversalCallback &cb);
-
 private:
   /**
    * Unregisters from History so this node no longer gets notifications about
    * changes to visitedness.
    */
   void UnregisterFromHistory();
 
   already_AddRefed<nsIURI> GetURIToMutate();
   void SetHrefAttribute(nsIURI *aURI);
 
-  void CreateSearchParamsIfNeeded();
-
-  void SetSearchInternal(const nsAString& aSearch);
-
   mutable nsCOMPtr<nsIURI> mCachedURI;
 
   Element * const mElement;
 
   // Strong reference to History.  The link has to unregister before History
   // can disappear.
   nsCOMPtr<IHistory> mHistory;
 
   uint16_t mLinkState;
 
   bool mNeedsRegistration;
 
   bool mRegistered;
-
-protected:
-  RefPtr<URLSearchParams> mSearchParams;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(Link, MOZILLA_DOM_LINK_IMPLEMENTATION_IID)
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_Link_h__
--- a/dom/base/test/test_urlSearchParams.html
+++ b/dom/base/test/test_urlSearchParams.html
@@ -14,18 +14,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=887836">Mozilla Bug 887836</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   <iframe name="x" id="x"></iframe>
   <iframe name="y" id="y"></iframe>
 </div>
 <pre id="test">
 </pre>
-<a href="http://www.example.net?a=b&c=d" id="anchor">foobar</a>
-<area href="http://www.example.net?a=b&c=d" id="area">foobar</area>
 <script type="application/javascript">
 
   /** Test for Bug 887836 **/
   ok("URLSearchParams" in window, "window.URLSearchParams exists");
 
   function testSimpleURLSearchParams() {
     var u = new URLSearchParams();
     ok(u, "URLSearchParams created");
@@ -122,30 +120,16 @@ https://bugzilla.mozilla.org/show_bug.cg
     is(url.searchParams.get('c'), 'd', "URL.searchParams.get('c')");
 
     url.searchParams.set('e', 'f');
     ok(url.href.indexOf('e=f') != 1, 'URL right');
 
     runTest();
   }
 
-  function testElement(e) {
-    ok(e, 'element exists');
-    ok(e.searchParams, "e.searchParams exists!");
-    ok(e.searchParams.has('a'), "e.searchParams.has('a')");
-    is(e.searchParams.get('a'), 'b', "e.searchParams.get('a')");
-    ok(e.searchParams.has('c'), "e.searchParams.has('c')");
-    is(e.searchParams.get('c'), 'd', "e.searchParams.get('c')");
-
-    e.searchParams.set('e', 'f');
-    ok(e.href.indexOf('e=f') != 1, 'e is right');
-
-    runTest();
-  }
-
   function testEncoding() {
     var encoding = [ [ '1', '1' ],
                      [ 'a b', 'a+b' ],
                      [ '<>', '%3C%3E' ],
                      [ '\u0541', '%D5%81'] ];
 
     for (var i = 0; i < encoding.length; ++i) {
       var url = new URL('http://www.example.net');
@@ -314,18 +298,16 @@ https://bugzilla.mozilla.org/show_bug.cg
     runTest();
   }
 
   var tests = [
     testSimpleURLSearchParams,
     testCopyURLSearchParams,
     testParserURLSearchParams,
     testURL,
-    function() { testElement(document.getElementById('anchor')) },
-    function() { testElement(document.getElementById('area')) },
     testEncoding,
     testOrdering,
     testDelete,
     testGetNULL,
     testSet,
     testIterable,
     testZeroHandling,
     testCopyConstructor,
--- a/dom/html/HTMLAnchorElement.cpp
+++ b/dom/html/HTMLAnchorElement.cpp
@@ -58,23 +58,21 @@ NS_INTERFACE_TABLE_TAIL_INHERITING(nsGen
 
 NS_IMPL_ADDREF_INHERITED(HTMLAnchorElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLAnchorElement, Element)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLAnchorElement)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLAnchorElement,
                                                   nsGenericHTMLElement)
-  tmp->Link::Traverse(cb);
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRelList)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLAnchorElement,
                                                 nsGenericHTMLElement)
-  tmp->Link::Unlink();
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mRelList)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLAnchorElement)
 
 JSObject*
 HTMLAnchorElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
 {
--- a/dom/html/HTMLAreaElement.cpp
+++ b/dom/html/HTMLAreaElement.cpp
@@ -35,23 +35,21 @@ NS_INTERFACE_TABLE_TAIL_INHERITING(nsGen
 
 NS_IMPL_ADDREF_INHERITED(HTMLAreaElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLAreaElement, Element)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLAreaElement)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLAreaElement,
                                                   nsGenericHTMLElement)
-  tmp->Link::Traverse(cb);
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRelList)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLAreaElement,
                                                 nsGenericHTMLElement)
-  tmp->Link::Unlink();
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mRelList)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLAreaElement)
 
 
 NS_IMPL_STRING_ATTR(HTMLAreaElement, Alt, alt)
 NS_IMPL_STRING_ATTR(HTMLAreaElement, Coords, coords)
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -43,25 +43,23 @@ HTMLLinkElement::~HTMLLinkElement()
 {
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLLinkElement)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLLinkElement,
                                                   nsGenericHTMLElement)
   tmp->nsStyleLinkElement::Traverse(cb);
-  tmp->Link::Traverse(cb);
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRelList)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mImportLoader)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLLinkElement,
                                                 nsGenericHTMLElement)
   tmp->nsStyleLinkElement::Unlink();
-  tmp->Link::Unlink();
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mRelList)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mImportLoader)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLLinkElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLLinkElement, Element)
 
 
--- a/dom/svg/SVGAElement.cpp
+++ b/dom/svg/SVGAElement.cpp
@@ -44,22 +44,20 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION
                                nsIDOMSVGElement,
                                Link)
 NS_INTERFACE_TABLE_TAIL_INHERITING(SVGAElementBase)
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(SVGAElement)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SVGAElement,
                                                   SVGAElementBase)
-  tmp->Link::Traverse(cb);
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(SVGAElement,
                                                 SVGAElementBase)
-  tmp->Link::Unlink();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ADDREF_INHERITED(SVGAElement, SVGAElementBase)
 NS_IMPL_RELEASE_INHERITED(SVGAElement, SVGAElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
--- a/dom/webidl/HTMLAnchorElement.webidl
+++ b/dom/webidl/HTMLAnchorElement.webidl
@@ -27,18 +27,18 @@ interface HTMLAnchorElement : HTMLElemen
            [SetterThrows]
            attribute DOMString hreflang;
            [SetterThrows]
            attribute DOMString type;
 
            [SetterThrows]
            attribute DOMString text;
 };
-HTMLAnchorElement implements URLUtils;
-HTMLAnchorElement implements URLUtilsSearchParams;
+
+HTMLAnchorElement implements HTMLHyperlinkElementUtils;
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLAnchorElement {
            [SetterThrows]
            attribute DOMString coords;
            [SetterThrows]
            attribute DOMString charset;
            [SetterThrows]
--- a/dom/webidl/HTMLAreaElement.webidl
+++ b/dom/webidl/HTMLAreaElement.webidl
@@ -26,24 +26,17 @@ interface HTMLAreaElement : HTMLElement 
            attribute DOMString download;
            [SetterThrows]
            attribute DOMString ping;
            [SetterThrows]
            attribute DOMString rel;
            [SetterThrows, Pref="network.http.enablePerElementReferrer"]
            attribute DOMString referrer;
   readonly attribute DOMTokenList relList;
+};
 
-  // not implemented.
-  //
-  //       [SetterThrows]
-  //       attribute DOMString hreflang;
-  //       [SetterThrows]
-  //       attribute DOMString type;
-};
-HTMLAreaElement implements URLUtils;
-HTMLAreaElement implements URLUtilsSearchParams;
+HTMLAreaElement implements HTMLHyperlinkElementUtils;
 
 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
 partial interface HTMLAreaElement {
            [SetterThrows]
            attribute boolean noHref;
 };
new file mode 100644
--- /dev/null
+++ b/dom/webidl/HTMLHyperlinkElementUtils.webidl
@@ -0,0 +1,45 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * The origin of this IDL file is
+ * https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+[NoInterfaceObject]
+interface HTMLHyperlinkElementUtils {
+  // Bug 824857: no support for stringifier attributes yet.
+  //  stringifier attribute USVString href;
+
+  // Bug 824857 should remove this.
+  [Throws]
+  stringifier;
+
+  [Throws]
+           attribute USVString href;
+
+  [Throws]
+  readonly attribute USVString origin;
+  [Throws]
+           attribute USVString protocol;
+  [Throws]
+           attribute USVString username;
+  [Throws]
+           attribute USVString password;
+  [Throws]
+           attribute USVString host;
+  [Throws]
+           attribute USVString hostname;
+  [Throws]
+           attribute USVString port;
+  [Throws]
+           attribute USVString pathname;
+  [Throws]
+           attribute USVString search;
+  [Throws]
+           attribute USVString hash;
+};
--- a/dom/webidl/Location.webidl
+++ b/dom/webidl/Location.webidl
@@ -8,18 +8,46 @@
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 [Unforgeable]
 interface Location {
+  // Bug 824857: no support for stringifier attributes yet.
+  //  stringifier attribute USVString href;
+
+  // Bug 824857 should remove this.
+  [Throws]
+  stringifier;
+
+  [Throws, CrossOriginWritable]
+           attribute USVString href;
+  [Throws]
+  readonly attribute USVString origin;
+  [Throws]
+           attribute USVString protocol;
+  [Throws]
+           attribute USVString host;
+  [Throws]
+           attribute USVString hostname;
+  [Throws]
+           attribute USVString port;
+  [Throws]
+           attribute USVString pathname;
+  [Throws]
+           attribute USVString search;
+  [Throws]
+           attribute USVString hash;
+
   [Throws, UnsafeInPrerendering]
   void assign(DOMString url);
+
   [Throws, CrossOriginCallable, UnsafeInPrerendering]
   void replace(DOMString url);
+
   // XXXbz there is no forceget argument in the spec!  See bug 1037721.
   [Throws, UnsafeInPrerendering]
   void reload(optional boolean forceget = false);
+
+  // Bug 1085214 [SameObject] readonly attribute USVString[] ancestorOrigins;
 };
-
-Location implements URLUtils;
--- a/dom/webidl/URL.webidl
+++ b/dom/webidl/URL.webidl
@@ -12,19 +12,54 @@
  * liability, trademark and document use rules apply.
  */
 
 // [Constructor(DOMString url, optional (URL or DOMString) base = "about:blank")]
 [Constructor(DOMString url, URL base),
  Constructor(DOMString url, optional DOMString base),
  Exposed=(Window,Worker)]
 interface URL {
+  [Throws]
+  stringifier;
+
+  [Throws]
+  attribute USVString href;
+
+  [Throws]
+  readonly attribute USVString origin;
+
+  [Throws]
+           attribute USVString protocol;
+
+  [Throws]
+           attribute USVString username;
+
+  [Throws]
+           attribute USVString password;
+
+  [Throws]
+           attribute USVString host;
+
+  [Throws]
+           attribute USVString hostname;
+
+  [Throws]
+           attribute USVString port;
+
+  [Throws]
+           attribute USVString pathname;
+
+  [Throws]
+           attribute USVString search;
+
+  readonly attribute URLSearchParams searchParams;
+
+  [Throws]
+           attribute USVString hash;
 };
-URL implements URLUtils;
-URL implements URLUtilsSearchParams;
 
 partial interface URL {
   [Throws]
   static DOMString? createObjectURL(Blob blob, optional objectURLOptions options);
   [Throws]
   static DOMString? createObjectURL(MediaStream stream, optional objectURLOptions options);
   [Throws]
   static void revokeObjectURL(DOMString url);
deleted file mode 100644
--- a/dom/webidl/URLUtils.webidl
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://url.spec.whatwg.org/#urlutils
- *
- * To the extent possible under law, the editors have waived all copyright
- * and related or neighboring rights to this work. In addition, as of 17
- * February 2013, the editors have made this specification available under
- * the Open Web Foundation Agreement Version 1.0, which is available at
- * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
- */
-
-[NoInterfaceObject,
- Exposed=(Window, Worker)]
-interface URLUtils {
-  // Bug 824857: no support for stringifier attributes yet.
-  //  stringifier attribute USVString href;
-  [Throws, CrossOriginWritable=Location]
-           attribute USVString href;
-  [Throws]
-  readonly attribute USVString origin;
-
-  [Throws]
-           attribute USVString protocol;
-  [Throws]
-           attribute USVString username;
-  [Throws]
-           attribute USVString password;
-  [Throws]
-           attribute USVString host;
-  [Throws]
-           attribute USVString hostname;
-  [Throws]
-           attribute USVString port;
-  [Throws]
-           attribute USVString pathname;
-  [Throws]
-           attribute USVString search;
-
-  [Throws]
-           attribute USVString hash;
-
-  // Bug 824857 should remove this.
-  [Throws]
-  stringifier;
-};
-
-[NoInterfaceObject,
- Exposed=(Window, Worker)]
-interface URLUtilsSearchParams {
- readonly attribute URLSearchParams searchParams;
-};
deleted file mode 100644
--- a/dom/webidl/URLUtilsReadOnly.webidl
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * http://url.spec.whatwg.org/#urlutils
- *
- * To the extent possible under law, the editors have waived all copyright
- * and related or neighboring rights to this work. In addition, as of 21
- * May 2013, the editors have made this specification available under
- * the Open Web Foundation Agreement Version 1.0, which is available at
- * http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
- */
-
-[NoInterfaceObject,
- Exposed=(Window, Worker)]
-interface URLUtilsReadOnly {
-  stringifier;
-  readonly attribute USVString href;
-
-  readonly attribute USVString protocol;
-  readonly attribute USVString host;
-  readonly attribute USVString hostname;
-  readonly attribute USVString port;
-  readonly attribute USVString pathname;
-  readonly attribute USVString search;
-  readonly attribute USVString hash;
-  readonly attribute USVString origin;
-};
--- a/dom/webidl/WorkerLocation.webidl
+++ b/dom/webidl/WorkerLocation.webidl
@@ -8,10 +8,26 @@
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and Opera
  * Software ASA.
  * You are granted a license to use, reproduce and create derivative works of
  * this document.
  */
 
 [Exposed=Worker]
-interface WorkerLocation { };
-WorkerLocation implements URLUtilsReadOnly;
+interface WorkerLocation {
+  // Bug 824857: no support for stringifier attributes yet.
+  //  stringifier attribute USVString href;
+
+  // Bug 824857 should remove this.
+  stringifier;
+
+  readonly attribute USVString href;
+
+  readonly attribute USVString origin;
+  readonly attribute USVString protocol;
+  readonly attribute USVString host;
+  readonly attribute USVString hostname;
+  readonly attribute USVString port;
+  readonly attribute USVString pathname;
+  readonly attribute USVString search;
+  readonly attribute USVString hash;
+};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -198,16 +198,17 @@ WEBIDL_FILES = [
     'HTMLFormControlsCollection.webidl',
     'HTMLFormElement.webidl',
     'HTMLFrameElement.webidl',
     'HTMLFrameSetElement.webidl',
     'HTMLHeadElement.webidl',
     'HTMLHeadingElement.webidl',
     'HTMLHRElement.webidl',
     'HTMLHtmlElement.webidl',
+    'HTMLHyperlinkElementUtils.webidl',
     'HTMLIFrameElement.webidl',
     'HTMLImageElement.webidl',
     'HTMLInputElement.webidl',
     'HTMLLabelElement.webidl',
     'HTMLLegendElement.webidl',
     'HTMLLIElement.webidl',
     'HTMLLinkElement.webidl',
     'HTMLMapElement.webidl',
@@ -569,18 +570,16 @@ WEBIDL_FILES = [
     'TVSource.webidl',
     'TVTuner.webidl',
     'UDPMessageEvent.webidl',
     'UDPSocket.webidl',
     'UIEvent.webidl',
     'UndoManager.webidl',
     'URL.webidl',
     'URLSearchParams.webidl',
-    'URLUtils.webidl',
-    'URLUtilsReadOnly.webidl',
     'USSDSession.webidl',
     'ValidityState.webidl',
     'VideoPlaybackQuality.webidl',
     'VideoStreamTrack.webidl',
     'VideoTrack.webidl',
     'VideoTrackList.webidl',
     'VRDevice.webidl',
     'VTTCue.webidl',
--- a/toolkit/components/places/tests/cpp/mock_Link.h
+++ b/toolkit/components/places/tests/cpp/mock_Link.h
@@ -112,28 +112,16 @@ Link::GetURI() const
 
 size_t
 Link::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
 {
   NS_NOTREACHED("Unexpected call to Link::SizeOfExcludingThis");
   return 0;
 }
 
-void
-Link::URLSearchParamsUpdated(URLSearchParams* aSearchParams)
-{
-  NS_NOTREACHED("Unexpected call to Link::URLSearchParamsUpdated");
-}
-
-void
-Link::UpdateURLSearchParams()
-{
-  NS_NOTREACHED("Unexpected call to Link::UpdateURLSearchParams");
-}
-
 NS_IMPL_CYCLE_COLLECTION_CLASS(URLSearchParams)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(URLSearchParams)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(URLSearchParams)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(URLSearchParams)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(URLSearchParams)