Bug 835800 - Convert more DOM attribute reflectors to DOMString. r=bzbarsky
authorDhi Aurrahman <diorahman@rockybars.com>
Fri, 13 Feb 2015 08:27:39 +0700
changeset 245014 0c1fc54afdf5c658724e11cd8aa214bbd7cbbe6d
parent 245013 fb653123d5552c4d4b3b9ce81d4f36738b1cce1c
child 245015 398df560c211dbdbb3874c0993dff60755c3108e
push id744
push usermichael.l.comella@gmail.com
push dateFri, 20 Feb 2015 17:03:25 +0000
reviewersbzbarsky
bugs835800
milestone38.0a1
Bug 835800 - Convert more DOM attribute reflectors to DOMString. r=bzbarsky
dom/html/HTMLAnchorElement.cpp
dom/html/HTMLAnchorElement.h
dom/html/HTMLAreaElement.cpp
dom/html/HTMLAreaElement.h
dom/html/HTMLBodyElement.cpp
dom/html/HTMLBodyElement.h
dom/html/HTMLDataElement.cpp
dom/html/HTMLDataElement.h
dom/html/HTMLDivElement.h
dom/html/HTMLFontElement.h
dom/html/HTMLFrameSetElement.cpp
dom/html/HTMLFrameSetElement.h
dom/html/HTMLIFrameElement.cpp
dom/html/HTMLIFrameElement.h
dom/html/HTMLImageElement.cpp
dom/html/HTMLImageElement.h
dom/html/HTMLLIElement.h
dom/html/HTMLLegendElement.h
dom/html/HTMLLinkElement.cpp
dom/html/HTMLLinkElement.h
dom/html/HTMLMediaElement.cpp
dom/html/HTMLMediaElement.h
dom/html/HTMLMetaElement.cpp
dom/html/HTMLMetaElement.h
dom/html/HTMLModElement.h
dom/html/HTMLObjectElement.cpp
dom/html/HTMLObjectElement.h
dom/html/HTMLSharedListElement.h
dom/html/HTMLSharedObjectElement.cpp
dom/html/HTMLSharedObjectElement.h
dom/html/HTMLSourceElement.cpp
dom/html/HTMLSourceElement.h
dom/html/HTMLTableCaptionElement.h
dom/html/HTMLTableCellElement.cpp
dom/html/HTMLTableCellElement.h
dom/html/HTMLTableColElement.h
dom/html/HTMLTableElement.h
dom/html/HTMLTableRowElement.h
dom/html/HTMLTableSectionElement.h
dom/html/HTMLTimeElement.cpp
dom/html/HTMLTimeElement.h
dom/html/HTMLTrackElement.h
dom/html/nsGenericHTMLElement.cpp
dom/html/nsGenericHTMLElement.h
--- a/dom/html/HTMLAnchorElement.cpp
+++ b/dom/html/HTMLAnchorElement.cpp
@@ -87,17 +87,17 @@ NS_IMPL_STRING_ATTR(HTMLAnchorElement, D
 
 int32_t
 HTMLAnchorElement::TabIndexDefault()
 {
   return 0;
 }
 
 void
-HTMLAnchorElement::GetItemValueText(nsAString& aValue)
+HTMLAnchorElement::GetItemValueText(DOMString& aValue)
 {
   GetHref(aValue);
 }
 
 void
 HTMLAnchorElement::SetItemValueText(const nsAString& aValue)
 {
   SetHref(aValue);
--- a/dom/html/HTMLAnchorElement.h
+++ b/dom/html/HTMLAnchorElement.h
@@ -100,47 +100,47 @@ public:
   {
     SetHTMLAttr(nsGkAtoms::href, aValue, rv);
   }
   // The XPCOM GetTarget is OK for us
   void SetTarget(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::target, aValue, rv);
   }
-  void GetDownload(nsString& aValue)
+  void GetDownload(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::download, aValue);
   }
   void SetDownload(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::download, aValue, rv);
   }
   // The XPCOM GetPing is OK for us
   void SetPing(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::ping, aValue, rv);
   }
-  void GetRel(nsString& aValue)
+  void GetRel(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::rel, aValue);
   }
   void SetRel(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::rel, aValue, rv);
   }
   nsDOMTokenList* RelList();
-  void GetHreflang(nsString& aValue)
+  void GetHreflang(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::hreflang, aValue);
   }
   void SetHreflang(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::hreflang, aValue, rv);
   }
-  void GetType(nsString& aValue)
+  void GetType(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::type, aValue);
   }
   void SetType(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::type, aValue, rv);
   }
   // The XPCOM GetText is OK for us
@@ -174,65 +174,65 @@ public:
 
   using Link::GetSearch;
   using Link::SetSearch;
 
   using Link::GetHash;
   using Link::SetHash;
 
   // The XPCOM URI decomposition attributes are fine for us
-  void GetCoords(nsString& aValue)
+  void GetCoords(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::coords, aValue);
   }
   void SetCoords(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::coords, aValue, rv);
   }
-  void GetCharset(nsString& aValue)
+  void GetCharset(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::charset, aValue);
   }
   void SetCharset(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::charset, aValue, rv);
   }
-  void GetName(nsString& aValue)
+  void GetName(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::name, aValue);
   }
   void SetName(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::name, aValue, rv);
   }
-  void GetRev(nsString& aValue)
+  void GetRev(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::rev, aValue);
   }
   void SetRev(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::rev, aValue, rv);
   }
-  void GetShape(nsString& aValue)
+  void GetShape(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::shape, aValue);
   }
   void SetShape(const nsAString& aValue, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::shape, aValue, rv);
   }
   void Stringify(nsAString& aResult, ErrorResult& aError)
   {
     GetHref(aResult, aError);
   }
 
 protected:
   virtual ~HTMLAnchorElement();
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
   virtual JSObject* WrapNode(JSContext *aCx) MOZ_OVERRIDE;
   nsRefPtr<nsDOMTokenList > mRelList;
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/html/HTMLAreaElement.cpp
+++ b/dom/html/HTMLAreaElement.cpp
@@ -62,17 +62,17 @@ NS_IMPL_STRING_ATTR(HTMLAreaElement, Dow
 
 int32_t
 HTMLAreaElement::TabIndexDefault()
 {
   return 0;
 }
 
 void
-HTMLAreaElement::GetItemValueText(nsAString& aValue)
+HTMLAreaElement::GetItemValueText(DOMString& aValue)
 {
   GetHref(aValue);
 }
 
 void
 HTMLAreaElement::SetItemValueText(const nsAString& aValue)
 {
   SetHref(aValue);
--- a/dom/html/HTMLAreaElement.h
+++ b/dom/html/HTMLAreaElement.h
@@ -112,17 +112,17 @@ public:
   }
 
   // The XPCOM GetPing is OK for us
   void SetPing(const nsAString& aPing, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::ping, aPing, aError);
   }
   
-  void GetRel(nsString& aValue)
+  void GetRel(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::rel, aValue);
   }
 
   void SetRel(const nsAString& aRel, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::rel, aRel, aError);
   } 
@@ -175,17 +175,17 @@ public:
     GetHref(aResult, aError);
   }
 
 protected:
   virtual ~HTMLAreaElement();
 
   virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
   nsRefPtr<nsDOMTokenList > mRelList;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif /* mozilla_dom_HTMLAreaElement_h */
--- a/dom/html/HTMLBodyElement.cpp
+++ b/dom/html/HTMLBodyElement.cpp
@@ -205,104 +205,104 @@ HTMLBodyElement::SetBackground(const nsA
   ErrorResult rv;
   SetBackground(aBackground, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLBodyElement::GetBackground(nsAString& aBackground)
 {
-  nsString background;
+  DOMString background;
   GetBackground(background);
-  aBackground = background;
+  background.ToString(aBackground);
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 HTMLBodyElement::SetVLink(const nsAString& aVLink)
 {
   ErrorResult rv;
   SetVLink(aVLink, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLBodyElement::GetVLink(nsAString& aVLink)
 {
-  nsString vLink;
+  DOMString vLink;
   GetVLink(vLink);
-  aVLink = vLink;
+  vLink.ToString(aVLink);
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 HTMLBodyElement::SetALink(const nsAString& aALink)
 {
   ErrorResult rv;
   SetALink(aALink, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLBodyElement::GetALink(nsAString& aALink)
 {
-  nsString aLink;
+  DOMString aLink;
   GetALink(aLink);
-  aALink = aLink;
+  aLink.ToString(aALink);
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 HTMLBodyElement::SetLink(const nsAString& aLink)
 {
   ErrorResult rv;
   SetLink(aLink, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLBodyElement::GetLink(nsAString& aLink)
 {
-  nsString link;
+  DOMString link;
   GetLink(link);
-  aLink = link;
+  link.ToString(aLink);
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 HTMLBodyElement::SetText(const nsAString& aText)
 {
   ErrorResult rv;
   SetText(aText, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLBodyElement::GetText(nsAString& aText)
 {
-  nsString text;
+  DOMString text;
   GetText(text);
-  aText = text;
+  text.ToString(aText);
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 HTMLBodyElement::SetBgColor(const nsAString& aBgColor)
 {
   ErrorResult rv;
   SetBgColor(aBgColor, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLBodyElement::GetBgColor(nsAString& aBgColor)
 {
-  nsString bgColor;
+  DOMString bgColor;
   GetBgColor(bgColor);
-  aBgColor = bgColor;
+  bgColor.ToString(aBgColor);
   return NS_OK;
 }
 
 bool
 HTMLBodyElement::ParseAttribute(int32_t aNamespaceID,
                                 nsIAtom* aAttribute,
                                 const nsAString& aValue,
                                 nsAttrValue& aResult)
--- a/dom/html/HTMLBodyElement.h
+++ b/dom/html/HTMLBodyElement.h
@@ -63,57 +63,57 @@ public:
 #define BEFOREUNLOAD_EVENT(name_, id_, type_, struct_)                  \
   WINDOW_EVENT_HELPER(name_, OnBeforeUnloadEventHandlerNonNull)
 #include "mozilla/EventNameList.h" // IWYU pragma: keep
 #undef BEFOREUNLOAD_EVENT
 #undef WINDOW_EVENT
 #undef WINDOW_EVENT_HELPER
 #undef EVENT
 
-  void GetText(nsString& aText)
+  void GetText(DOMString& aText)
   {
     GetHTMLAttr(nsGkAtoms::text, aText);
   }
   void SetText(const nsAString& aText, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::text, aText, aError);
   }
-  void GetLink(nsString& aLink)
+  void GetLink(DOMString& aLink)
   {
     GetHTMLAttr(nsGkAtoms::link, aLink);
   }
   void SetLink(const nsAString& aLink, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::link, aLink, aError);
   }
-  void GetVLink(nsString& aVLink)
+  void GetVLink(DOMString& aVLink)
   {
     GetHTMLAttr(nsGkAtoms::vlink, aVLink);
   }
   void SetVLink(const nsAString& aVLink, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::vlink, aVLink, aError);
   }
-  void GetALink(nsString& aALink)
+  void GetALink(DOMString& aALink)
   {
     GetHTMLAttr(nsGkAtoms::alink, aALink);
   }
   void SetALink(const nsAString& aALink, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::alink, aALink, aError);
   }
-  void GetBgColor(nsString& aBgColor)
+  void GetBgColor(DOMString& aBgColor)
   {
     GetHTMLAttr(nsGkAtoms::bgcolor, aBgColor);
   }
   void SetBgColor(const nsAString& aBgColor, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::bgcolor, aBgColor, aError);
   }
-  void GetBackground(nsString& aBackground)
+  void GetBackground(DOMString& aBackground)
   {
     GetHTMLAttr(nsGkAtoms::background, aBackground);
   }
   void SetBackground(const nsAString& aBackground, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::background, aBackground, aError);
   }
 
--- a/dom/html/HTMLDataElement.cpp
+++ b/dom/html/HTMLDataElement.cpp
@@ -25,17 +25,17 @@ NS_IMPL_ELEMENT_CLONE(HTMLDataElement)
 
 JSObject*
 HTMLDataElement::WrapNode(JSContext* aCx)
 {
   return HTMLDataElementBinding::Wrap(aCx, this);
 }
 
 void
-HTMLDataElement::GetItemValueText(nsAString& text)
+HTMLDataElement::GetItemValueText(DOMString& text)
 {
   GetValue(text);
 }
 
 void
 HTMLDataElement::SetItemValueText(const nsAString& text)
 {
   ErrorResult rv;
--- a/dom/html/HTMLDataElement.h
+++ b/dom/html/HTMLDataElement.h
@@ -15,27 +15,27 @@ namespace mozilla {
 namespace dom {
 
 class HTMLDataElement MOZ_FINAL : public nsGenericHTMLElement
 {
 public:
   explicit HTMLDataElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // HTMLDataElement WebIDL
-  void GetValue(nsAString& aValue)
+  void GetValue(DOMString& aValue)
   {
     GetHTMLAttr(nsGkAtoms::value, aValue);
   }
 
   void SetValue(const nsAString& aValue, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::value, aValue, aError);
   }
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
   virtual nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
 
 protected:
   virtual ~HTMLDataElement();
 
   virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
 };
--- a/dom/html/HTMLDivElement.h
+++ b/dom/html/HTMLDivElement.h
@@ -22,29 +22,29 @@ public:
   }
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLDivElement
   NS_IMETHOD GetAlign(nsAString& aAlign) MOZ_OVERRIDE
   {
-    nsString align;
+    DOMString align;
     GetAlign(align);
-    aAlign = align;
+    align.ToString(aAlign);
     return NS_OK;
   }
   NS_IMETHOD SetAlign(const nsAString& aAlign) MOZ_OVERRIDE
   {
     mozilla::ErrorResult rv;
     SetAlign(aAlign, rv);
     return rv.ErrorCode();
   }
 
-  void GetAlign(nsString& aAlign)
+  void GetAlign(DOMString& aAlign)
   {
     GetHTMLAttr(nsGkAtoms::align, aAlign);
   }
   void SetAlign(const nsAString& aAlign, mozilla::ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
 
--- a/dom/html/HTMLFontElement.h
+++ b/dom/html/HTMLFontElement.h
@@ -14,33 +14,33 @@ namespace dom {
 class HTMLFontElement MOZ_FINAL : public nsGenericHTMLElement
 {
 public:
   explicit HTMLFontElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
   }
 
-  void GetColor(nsString& aColor)
+  void GetColor(DOMString& aColor)
   {
     GetHTMLAttr(nsGkAtoms::color, aColor);
   }
   void SetColor(const nsAString& aColor, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::color, aColor, aError);
   }
-  void GetFace(nsString& aFace)
+  void GetFace(DOMString& aFace)
   {
     GetHTMLAttr(nsGkAtoms::face, aFace);
   }
   void SetFace(const nsAString& aFace, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::face, aFace, aError);
   }
-  void GetSize(nsString& aSize)
+  void GetSize(DOMString& aSize)
   {
     GetHTMLAttr(nsGkAtoms::size, aSize);
   }
   void SetSize(const nsAString& aSize, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::size, aSize, aError);
   }
 
--- a/dom/html/HTMLFrameSetElement.cpp
+++ b/dom/html/HTMLFrameSetElement.cpp
@@ -34,36 +34,36 @@ HTMLFrameSetElement::SetCols(const nsASt
   ErrorResult rv;
   SetCols(aCols, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLFrameSetElement::GetCols(nsAString& aCols)
 {
-  nsString cols;
+  DOMString cols;
   GetCols(cols);
-  aCols = cols;
+  cols.ToString(aCols);
   return NS_OK;
 }
 
 NS_IMETHODIMP 
 HTMLFrameSetElement::SetRows(const nsAString& aRows)
 {
   ErrorResult rv;
   SetRows(aRows, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLFrameSetElement::GetRows(nsAString& aRows)
 {
-  nsString rows;
+  DOMString rows;
   GetRows(rows);
-  aRows = rows;
+  rows.ToString(aRows);
   return NS_OK;
 }
 
 nsresult
 HTMLFrameSetElement::SetAttr(int32_t aNameSpaceID,
                              nsIAtom* aAttribute,
                              nsIAtom* aPrefix,
                              const nsAString& aValue,
--- a/dom/html/HTMLFrameSetElement.h
+++ b/dom/html/HTMLFrameSetElement.h
@@ -58,25 +58,25 @@ public:
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLFrameSetElement, frameset)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLFrameSetElement
   NS_DECL_NSIDOMHTMLFRAMESETELEMENT
 
-  void GetCols(nsString& aCols)
+  void GetCols(DOMString& aCols)
   {
     GetHTMLAttr(nsGkAtoms::cols, aCols);
   }
   void SetCols(const nsAString& aCols, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::cols, aCols, aError);
   }
-  void GetRows(nsString& aRows)
+  void GetRows(DOMString& aRows)
   {
     GetHTMLAttr(nsGkAtoms::rows, aRows);
   }
   void SetRows(const nsAString& aRows, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::rows, aRows, aError);
   }
 
--- a/dom/html/HTMLIFrameElement.cpp
+++ b/dom/html/HTMLIFrameElement.cpp
@@ -41,17 +41,17 @@ NS_IMPL_STRING_ATTR(HTMLIFrameElement, M
 NS_IMPL_STRING_ATTR(HTMLIFrameElement, Name, name)
 NS_IMPL_STRING_ATTR(HTMLIFrameElement, Scrolling, scrolling)
 NS_IMPL_URI_ATTR(HTMLIFrameElement, Src, src)
 NS_IMPL_STRING_ATTR(HTMLIFrameElement, Width, width)
 NS_IMPL_BOOL_ATTR(HTMLIFrameElement, AllowFullscreen, allowfullscreen)
 NS_IMPL_STRING_ATTR(HTMLIFrameElement, Srcdoc, srcdoc)
 
 void
-HTMLIFrameElement::GetItemValueText(nsAString& aValue)
+HTMLIFrameElement::GetItemValueText(DOMString& aValue)
 {
   GetSrc(aValue);
 }
 
 void
 HTMLIFrameElement::SetItemValueText(const nsAString& aValue)
 {
   SetSrc(aValue);
--- a/dom/html/HTMLIFrameElement.h
+++ b/dom/html/HTMLIFrameElement.h
@@ -172,17 +172,17 @@ public:
   }
   using nsGenericHTMLFrameElement::SetMozbrowser;
   // nsGenericHTMLFrameElement::GetFrameLoader is fine
   // nsGenericHTMLFrameElement::GetAppManifestURL is fine
 
 protected:
   virtual ~HTMLIFrameElement();
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
 
   virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
 
 private:
   static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
                                     nsRuleData* aData);
 };
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -176,17 +176,17 @@ HTMLImageElement::GetCurrentSrc(nsAStrin
   } else {
     SetDOMStringToNull(aValue);
   }
 
   return NS_OK;
 }
 
 void
-HTMLImageElement::GetItemValueText(nsAString& aValue)
+HTMLImageElement::GetItemValueText(DOMString& aValue)
 {
   GetSrc(aValue);
 }
 
 void
 HTMLImageElement::SetItemValueText(const nsAString& aValue)
 {
   SetSrc(aValue);
--- a/dom/html/HTMLImageElement.h
+++ b/dom/html/HTMLImageElement.h
@@ -306,17 +306,17 @@ protected:
   // If the node's srcset/sizes make for an invalid selector, returns
   // false. This does not guarantee the resulting selector matches an image,
   // only that it is valid.
   bool TryCreateResponsiveSelector(nsIContent *aSourceNode,
                                    const nsAString *aSrcset = nullptr,
                                    const nsAString *aSizes = nullptr);
 
   CSSIntPoint GetXY();
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
   virtual JSObject* WrapNode(JSContext *aCx) MOZ_OVERRIDE;
   void UpdateFormOwner();
 
   virtual nsresult BeforeSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                                  const nsAttrValueOrString* aValue,
                                  bool aNotify) MOZ_OVERRIDE;
 
--- a/dom/html/HTMLLIElement.h
+++ b/dom/html/HTMLLIElement.h
@@ -33,17 +33,17 @@ public:
                                 nsIAtom* aAttribute,
                                 const nsAString& aValue,
                                 nsAttrValue& aResult) MOZ_OVERRIDE;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
   virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL API
-  void GetType(nsString& aType)
+  void GetType(DOMString& aType)
   {
     GetHTMLAttr(nsGkAtoms::type, aType);
   }
   void SetType(const nsAString& aType, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::type, aType, rv);
   }
   int32_t Value() const
--- a/dom/html/HTMLLegendElement.h
+++ b/dom/html/HTMLLegendElement.h
@@ -62,17 +62,17 @@ public:
   }
 
   /**
    * WebIDL Interface
    */
 
   already_AddRefed<HTMLFormElement> GetForm();
 
-  void GetAlign(nsAString& aAlign)
+  void GetAlign(DOMString& aAlign)
   {
     GetHTMLAttr(nsGkAtoms::align, aAlign);
   }
 
   void SetAlign(const nsAString& aAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -114,17 +114,17 @@ NS_IMPL_URI_ATTR(HTMLLinkElement, Href, 
 NS_IMPL_STRING_ATTR(HTMLLinkElement, Hreflang, hreflang)
 NS_IMPL_STRING_ATTR(HTMLLinkElement, Media, media)
 NS_IMPL_STRING_ATTR(HTMLLinkElement, Rel, rel)
 NS_IMPL_STRING_ATTR(HTMLLinkElement, Rev, rev)
 NS_IMPL_STRING_ATTR(HTMLLinkElement, Target, target)
 NS_IMPL_STRING_ATTR(HTMLLinkElement, Type, type)
 
 void
-HTMLLinkElement::GetItemValueText(nsAString& aValue)
+HTMLLinkElement::GetItemValueText(DOMString& aValue)
 {
   GetHref(aValue);
 }
 
 void
 HTMLLinkElement::SetItemValueText(const nsAString& aValue)
 {
   SetHref(aValue);
--- a/dom/html/HTMLLinkElement.h
+++ b/dom/html/HTMLLinkElement.h
@@ -156,17 +156,17 @@ protected:
   virtual void GetStyleSheetInfo(nsAString& aTitle,
                                  nsAString& aType,
                                  nsAString& aMedia,
                                  bool* aIsScoped,
                                  bool* aIsAlternate) MOZ_OVERRIDE;
   virtual CORSMode GetCORSMode() const MOZ_OVERRIDE;
 protected:
   // nsGenericHTMLElement
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
   nsRefPtr<nsDOMTokenList > mRelList;
 private:
   nsRefPtr<ImportLoader> mImportLoader;
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2136,17 +2136,17 @@ HTMLMediaElement::~HTMLMediaElement()
   if (mChannel) {
     mChannel->Cancel(NS_BINDING_ABORTED);
   }
 
   WakeLockRelease();
 }
 
 void
-HTMLMediaElement::GetItemValueText(nsAString& aValue)
+HTMLMediaElement::GetItemValueText(DOMString& aValue)
 {
   // Can't call GetSrc because we don't have a JSContext
   GetURIAttr(nsGkAtoms::src, nullptr, aValue);
 }
 
 void
 HTMLMediaElement::SetItemValueText(const nsAString& aValue)
 {
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -627,17 +627,17 @@ public:
 
 protected:
   virtual ~HTMLMediaElement();
 
   class MediaLoadListener;
   class MediaStreamTracksAvailableCallback;
   class StreamListener;
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
 
   class WakeLockBoolWrapper {
   public:
     explicit WakeLockBoolWrapper(bool val = false)
       : mValue(val), mCanPlay(true), mOuter(nullptr) {}
 
     ~WakeLockBoolWrapper();
--- a/dom/html/HTMLMetaElement.cpp
+++ b/dom/html/HTMLMetaElement.cpp
@@ -31,17 +31,17 @@ NS_IMPL_ELEMENT_CLONE(HTMLMetaElement)
 
 
 NS_IMPL_STRING_ATTR(HTMLMetaElement, Content, content)
 NS_IMPL_STRING_ATTR(HTMLMetaElement, HttpEquiv, httpEquiv)
 NS_IMPL_STRING_ATTR(HTMLMetaElement, Name, name)
 NS_IMPL_STRING_ATTR(HTMLMetaElement, Scheme, scheme)
 
 void
-HTMLMetaElement::GetItemValueText(nsAString& aValue)
+HTMLMetaElement::GetItemValueText(DOMString& aValue)
 {
   GetContent(aValue);
 }
 
 void
 HTMLMetaElement::SetItemValueText(const nsAString& aValue)
 {
   SetContent(aValue);
--- a/dom/html/HTMLMetaElement.h
+++ b/dom/html/HTMLMetaElement.h
@@ -59,16 +59,16 @@ public:
     SetHTMLAttr(nsGkAtoms::scheme, aScheme, aRv);
   }
 
   virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
 
 protected:
   virtual ~HTMLMetaElement();
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_HTMLMetaElement_h
--- a/dom/html/HTMLModElement.h
+++ b/dom/html/HTMLModElement.h
@@ -23,17 +23,17 @@ public:
   void GetCite(nsString& aCite)
   {
     GetHTMLURIAttr(nsGkAtoms::cite, aCite);
   }
   void SetCite(const nsAString& aCite, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::cite, aCite, aRv);
   }
-  void GetDateTime(nsAString& aDateTime)
+  void GetDateTime(DOMString& aDateTime)
   {
     GetHTMLAttr(nsGkAtoms::datetime, aDateTime);
   }
   void SetDateTime(const nsAString& aDateTime, ErrorResult& aRv)
   {
     SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aRv);
   }
 
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -106,17 +106,17 @@ NS_IMPL_NSICONSTRAINTVALIDATION(HTMLObje
 
 NS_IMETHODIMP
 HTMLObjectElement::GetForm(nsIDOMHTMLFormElement **aForm)
 {
   return nsGenericHTMLFormElement::GetForm(aForm);
 }
 
 void
-HTMLObjectElement::GetItemValueText(nsAString& aValue)
+HTMLObjectElement::GetItemValueText(DOMString& aValue)
 {
   GetData(aValue);
 }
 
 void
 HTMLObjectElement::SetItemValueText(const nsAString& aValue)
 {
   SetData(aValue);
--- a/dom/html/HTMLObjectElement.h
+++ b/dom/html/HTMLObjectElement.h
@@ -230,17 +230,17 @@ private:
   void StartObjectLoad(bool aNotify);
 
   /**
    * Returns if the element is currently focusable regardless of it's tabindex
    * value. This is used to know the default tabindex value.
    */
   bool IsFocusableForTabIndex();
   
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
 
   virtual ~HTMLObjectElement();
 
   virtual JSObject* WrapNode(JSContext *aCx) MOZ_OVERRIDE;
 
   static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
                                     nsRuleData* aData);
--- a/dom/html/HTMLSharedListElement.h
+++ b/dom/html/HTMLSharedListElement.h
@@ -53,17 +53,17 @@ public:
   int32_t Start() const
   {
     return GetIntAttr(nsGkAtoms::start, 1);
   }
   void SetStart(int32_t aStart, mozilla::ErrorResult& rv)
   {
     SetHTMLIntAttr(nsGkAtoms::start, aStart, rv);
   }
-  void GetType(nsString& aType)
+  void GetType(DOMString& aType)
   {
     GetHTMLAttr(nsGkAtoms::type, aType);
   }
   void SetType(const nsAString& aType, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::type, aType, rv);
   }
   bool Compact() const
--- a/dom/html/HTMLSharedObjectElement.cpp
+++ b/dom/html/HTMLSharedObjectElement.cpp
@@ -31,17 +31,17 @@ HTMLSharedObjectElement::HTMLSharedObjec
   RegisterActivityObserver();
   SetIsNetworkCreated(aFromParser == FROM_PARSER_NETWORK);
 
   // By default we're in the loading state
   AddStatesSilently(NS_EVENT_STATE_LOADING);
 }
 
 void
-HTMLSharedObjectElement::GetItemValueText(nsAString& aValue)
+HTMLSharedObjectElement::GetItemValueText(DOMString& aValue)
 {
   if (mNodeInfo->Equals(nsGkAtoms::applet)) {
     nsGenericHTMLElement::GetItemValueText(aValue);
   } else {
     GetSrc(aValue);
   }
 }
 
--- a/dom/html/HTMLSharedObjectElement.h
+++ b/dom/html/HTMLSharedObjectElement.h
@@ -201,17 +201,17 @@ private:
            nsGkAtoms::code :
            nsGkAtoms::src;
   }
 
   // mIsDoneAddingChildren is only really used for <applet>.  This boolean is
   // always true for <embed>, per the documentation in nsIContent.h.
   bool mIsDoneAddingChildren;
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
 
   virtual JSObject* WrapNode(JSContext *aCx) MOZ_OVERRIDE;
 
   static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
                                     nsRuleData* aData);
 };
 
--- a/dom/html/HTMLSourceElement.cpp
+++ b/dom/html/HTMLSourceElement.cpp
@@ -116,17 +116,17 @@ HTMLSourceElement::AfterSetAttr(int32_t 
     }
   }
 
   return nsGenericHTMLElement::AfterSetAttr(aNameSpaceID, aName,
                                             aValue, aNotify);
 }
 
 void
-HTMLSourceElement::GetItemValueText(nsAString& aValue)
+HTMLSourceElement::GetItemValueText(DOMString& aValue)
 {
   GetSrc(aValue);
 }
 
 void
 HTMLSourceElement::SetItemValueText(const nsAString& aValue)
 {
   SetSrc(aValue);
--- a/dom/html/HTMLSourceElement.h
+++ b/dom/html/HTMLSourceElement.h
@@ -55,59 +55,59 @@ public:
   {
     GetURIAttr(nsGkAtoms::src, nullptr, aSrc);
   }
   void SetSrc(const nsAString& aSrc, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::src, aSrc, rv);
   }
 
-  void GetType(nsString& aType)
+  void GetType(DOMString& aType)
   {
     GetHTMLAttr(nsGkAtoms::type, aType);
   }
   void SetType(const nsAString& aType, ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::type, aType, rv);
   }
 
-  void GetSrcset(nsString& aSrcset)
+  void GetSrcset(DOMString& aSrcset)
   {
     GetHTMLAttr(nsGkAtoms::srcset, aSrcset);
   }
   void SetSrcset(const nsAString& aSrcset, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::srcset, aSrcset, rv);
   }
 
-  void GetSizes(nsString& aSizes)
+  void GetSizes(DOMString& aSizes)
   {
     GetHTMLAttr(nsGkAtoms::sizes, aSizes);
   }
   void SetSizes(const nsAString& aSizes, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::sizes, aSizes, rv);
   }
 
-  void GetMedia(nsString& aMedia)
+  void GetMedia(DOMString& aMedia)
   {
     GetHTMLAttr(nsGkAtoms::media, aMedia);
   }
   void SetMedia(const nsAString& aMedia, mozilla::ErrorResult& rv)
   {
     SetHTMLAttr(nsGkAtoms::media, aMedia, rv);
   }
 
 protected:
   virtual ~HTMLSourceElement();
 
   virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
 
 protected:
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
 
   virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                                 const nsAttrValue* aValue,
                                 bool aNotify) MOZ_OVERRIDE;
 
 
 private:
--- a/dom/html/HTMLTableCaptionElement.h
+++ b/dom/html/HTMLTableCaptionElement.h
@@ -23,17 +23,17 @@ public:
   }
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLTableCaptionElement
   NS_DECL_NSIDOMHTMLTABLECAPTIONELEMENT
 
-  void GetAlign(nsString& aAlign)
+  void GetAlign(DOMString& aAlign)
   {
     GetHTMLAttr(nsGkAtoms::align, aAlign);
   }
   void SetAlign(const nsAString& aAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
 
--- a/dom/html/HTMLTableCellElement.cpp
+++ b/dom/html/HTMLTableCellElement.cpp
@@ -122,155 +122,155 @@ HTMLTableCellElement::SetAbbr(const nsAS
   ErrorResult rv;
   SetAbbr(aAbbr, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetAbbr(nsAString& aAbbr)
 {
-  nsString abbr;
+  DOMString abbr;
   GetAbbr(abbr);
-  aAbbr = abbr;
+  abbr.ToString(aAbbr);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetAxis(const nsAString& aAxis)
 {
   ErrorResult rv;
   SetAxis(aAxis, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetAxis(nsAString& aAxis)
 {
-  nsString axis;
+  DOMString axis;
   GetAxis(axis);
-  aAxis = axis;
+  axis.ToString(aAxis);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetAlign(const nsAString& aAlign)
 {
   ErrorResult rv;
   SetAlign(aAlign, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetAlign(nsAString& aAlign)
 {
-  nsString align;
+  DOMString align;
   GetAlign(align);
-  aAlign = align;
+  align.ToString(aAlign);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetVAlign(const nsAString& aVAlign)
 {
   ErrorResult rv;
   SetVAlign(aVAlign, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetVAlign(nsAString& aVAlign)
 {
-  nsString vAlign;
+  DOMString vAlign;
   GetVAlign(vAlign);
-  aVAlign = vAlign;
+  vAlign.ToString(aVAlign);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetCh(const nsAString& aCh)
 {
   ErrorResult rv;
   SetCh(aCh, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetCh(nsAString& aCh)
 {
-  nsString ch;
+  DOMString ch;
   GetCh(ch);
-  aCh = ch;
+  ch.ToString(aCh);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetChOff(const nsAString& aChOff)
 {
   ErrorResult rv;
   SetChOff(aChOff, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetChOff(nsAString& aChOff)
 {
-  nsString chOff;
+  DOMString chOff;
   GetChOff(chOff);
-  aChOff = chOff;
+  chOff.ToString(aChOff);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetBgColor(const nsAString& aBgColor)
 {
   ErrorResult rv;
   SetBgColor(aBgColor, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetBgColor(nsAString& aBgColor)
 {
-  nsString bgColor;
+  DOMString bgColor;
   GetBgColor(bgColor);
-  aBgColor = bgColor;
+  bgColor.ToString(aBgColor);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetHeight(const nsAString& aHeight)
 {
   ErrorResult rv;
   SetHeight(aHeight, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetHeight(nsAString& aHeight)
 {
-  nsString height;
+  DOMString height;
   GetHeight(height);
-  aHeight = height;
+  height.ToString(aHeight);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetWidth(const nsAString& aWidth)
 {
   ErrorResult rv;
   SetWidth(aWidth, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetWidth(nsAString& aWidth)
 {
-  nsString width;
+  DOMString width;
   GetWidth(width);
-  aWidth = width;
+  width.ToString(aWidth);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetNoWrap(bool aNoWrap)
 {
   ErrorResult rv;
   SetNoWrap(aNoWrap, rv);
@@ -290,36 +290,36 @@ HTMLTableCellElement::SetScope(const nsA
   ErrorResult rv;
   SetScope(aScope, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetScope(nsAString& aScope)
 {
-  nsString scope;
+  DOMString scope;
   GetScope(scope);
-  aScope = scope;
+  scope.ToString(aScope);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetHeaders(const nsAString& aHeaders)
 {
   ErrorResult rv;
   SetHeaders(aHeaders, rv);
   return rv.ErrorCode();
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::GetHeaders(nsAString& aHeaders)
 {
-  nsString headers;
+  DOMString headers;
   GetHeaders(headers);
-  aHeaders = headers;
+  headers.ToString(aHeaders);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLTableCellElement::SetColSpan(int32_t aColSpan)
 {
   ErrorResult rv;
   SetColSpan(aColSpan, rv);
@@ -344,17 +344,17 @@ HTMLTableCellElement::SetRowSpan(int32_t
 NS_IMETHODIMP
 HTMLTableCellElement::GetRowSpan(int32_t* aRowSpan)
 {
   *aRowSpan = RowSpan();
   return NS_OK;
 }
 
 void
-HTMLTableCellElement::GetAlign(nsString& aValue)
+HTMLTableCellElement::GetAlign(DOMString& aValue)
 {
   if (!GetAttr(kNameSpaceID_None, nsGkAtoms::align, aValue)) {
     // There's no align attribute, ask the row for the alignment.
     HTMLTableRowElement* row = GetRow();
     if (row) {
       row->GetAlign(aValue);
     }
   }
--- a/dom/html/HTMLTableCellElement.h
+++ b/dom/html/HTMLTableCellElement.h
@@ -44,104 +44,104 @@ public:
   {
     return GetIntAttr(nsGkAtoms::rowspan, 1);
   }
   void SetRowSpan(uint32_t aRowSpan, ErrorResult& aError)
   {
     SetHTMLIntAttr(nsGkAtoms::rowspan, aRowSpan, aError);
   }
   //already_AddRefed<nsDOMSettableTokenList> Headers() const;
-  void GetHeaders(nsString& aHeaders)
+  void GetHeaders(DOMString& aHeaders)
   {
     GetHTMLAttr(nsGkAtoms::headers, aHeaders);
   }
   void SetHeaders(const nsAString& aHeaders, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::headers, aHeaders, aError);
   }
   int32_t CellIndex() const;
 
-  void GetAbbr(nsString& aAbbr)
+  void GetAbbr(DOMString& aAbbr)
   {
     GetHTMLAttr(nsGkAtoms::abbr, aAbbr);
   }
   void SetAbbr(const nsAString& aAbbr, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::abbr, aAbbr, aError);
   }
-  void GetScope(nsString& aScope)
+  void GetScope(DOMString& aScope)
   {
     GetHTMLAttr(nsGkAtoms::scope, aScope);
   }
   void SetScope(const nsAString& aScope, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::scope, aScope, aError);
   }
-  void GetAlign(nsString& aAlign);
+  void GetAlign(DOMString& aAlign);
   void SetAlign(const nsAString& aAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
-  void GetAxis(nsString& aAxis)
+  void GetAxis(DOMString& aAxis)
   {
     GetHTMLAttr(nsGkAtoms::axis, aAxis);
   }
   void SetAxis(const nsAString& aAxis, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::axis, aAxis, aError);
   }
-  void GetHeight(nsString& aHeight)
+  void GetHeight(DOMString& aHeight)
   {
     GetHTMLAttr(nsGkAtoms::height, aHeight);
   }
   void SetHeight(const nsAString& aHeight, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::height, aHeight, aError);
   }
-  void GetWidth(nsString& aWidth)
+  void GetWidth(DOMString& aWidth)
   {
     GetHTMLAttr(nsGkAtoms::width, aWidth);
   }
   void SetWidth(const nsAString& aWidth, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::width, aWidth, aError);
   }
-  void GetCh(nsString& aCh)
+  void GetCh(DOMString& aCh)
   {
     GetHTMLAttr(nsGkAtoms::_char, aCh);
   }
   void SetCh(const nsAString& aCh, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::_char, aCh, aError);
   }
-  void GetChOff(nsString& aChOff)
+  void GetChOff(DOMString& aChOff)
   {
     GetHTMLAttr(nsGkAtoms::charoff, aChOff);
   }
   void SetChOff(const nsAString& aChOff, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError);
   }
   bool NoWrap()
   {
     return GetBoolAttr(nsGkAtoms::nowrap);
   }
   void SetNoWrap(bool aNoWrap, ErrorResult& aError)
   {
     SetHTMLBoolAttr(nsGkAtoms::nowrap, aNoWrap, aError);
   }
-  void GetVAlign(nsString& aVAlign)
+  void GetVAlign(DOMString& aVAlign)
   {
     GetHTMLAttr(nsGkAtoms::valign, aVAlign);
   }
   void SetVAlign(const nsAString& aVAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError);
   }
-  void GetBgColor(nsString& aBgColor)
+  void GetBgColor(DOMString& aBgColor)
   {
     GetHTMLAttr(nsGkAtoms::bgcolor, aBgColor);
   }
   void SetBgColor(const nsAString& aBgColor, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::bgcolor, aBgColor, aError);
   }
 
--- a/dom/html/HTMLTableColElement.h
+++ b/dom/html/HTMLTableColElement.h
@@ -24,49 +24,49 @@ public:
   {
     return GetIntAttr(nsGkAtoms::span, 1);
   }
   void SetSpan(uint32_t aSpan, ErrorResult& aError)
   {
     SetHTMLIntAttr(nsGkAtoms::span, aSpan, aError);
   }
 
-  void GetAlign(nsString& aAlign)
+  void GetAlign(DOMString& aAlign)
   {
     GetHTMLAttr(nsGkAtoms::align, aAlign);
   }
   void SetAlign(const nsAString& aAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
-  void GetCh(nsString& aCh)
+  void GetCh(DOMString& aCh)
   {
     GetHTMLAttr(nsGkAtoms::_char, aCh);
   }
   void SetCh(const nsAString& aCh, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::_char, aCh, aError);
   }
-  void GetChOff(nsString& aChOff)
+  void GetChOff(DOMString& aChOff)
   {
     GetHTMLAttr(nsGkAtoms::charoff, aChOff);
   }
   void SetChOff(const nsAString& aChOff, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError);
   }
-  void GetVAlign(nsString& aVAlign)
+  void GetVAlign(DOMString& aVAlign)
   {
     GetHTMLAttr(nsGkAtoms::valign, aVAlign);
   }
   void SetVAlign(const nsAString& aVAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError);
   }
-  void GetWidth(nsString& aWidth)
+  void GetWidth(DOMString& aWidth)
   {
     GetHTMLAttr(nsGkAtoms::width, aWidth);
   }
   void SetWidth(const nsAString& aWidth, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::width, aWidth, aError);
   }
 
--- a/dom/html/HTMLTableElement.h
+++ b/dom/html/HTMLTableElement.h
@@ -91,81 +91,85 @@ public:
   already_AddRefed<nsGenericHTMLElement> CreateTBody();
 
   nsIHTMLCollection* Rows();
 
   already_AddRefed<nsGenericHTMLElement> InsertRow(int32_t aIndex,
                                                    ErrorResult& aError);
   void DeleteRow(int32_t aIndex, ErrorResult& aError);
 
-  void GetAlign(nsString& aAlign)
+  void GetAlign(DOMString& aAlign)
   {
     GetHTMLAttr(nsGkAtoms::align, aAlign);
   }
   void SetAlign(const nsAString& aAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
-  void GetBorder(nsString& aBorder)
+  void GetBorder(DOMString& aBorder)
   {
     GetHTMLAttr(nsGkAtoms::border, aBorder);
   }
   void SetBorder(const nsAString& aBorder, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::border, aBorder, aError);
   }
-  void GetFrame(nsString& aFrame)
+  void GetFrame(DOMString& aFrame)
   {
     GetHTMLAttr(nsGkAtoms::frame, aFrame);
   }
   void SetFrame(const nsAString& aFrame, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::frame, aFrame, aError);
   }
-  void GetRules(nsString& aRules)
+  void GetRules(DOMString& aRules)
   {
     GetHTMLAttr(nsGkAtoms::rules, aRules);
   }
   void SetRules(const nsAString& aRules, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::rules, aRules, aError);
   }
   void GetSummary(nsString& aSummary)
   {
     GetHTMLAttr(nsGkAtoms::summary, aSummary);
   }
+  void GetSummary(DOMString& aSummary)
+  {
+    GetHTMLAttr(nsGkAtoms::summary, aSummary);
+  }
   void SetSummary(const nsAString& aSummary, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::summary, aSummary, aError);
   }
-  void GetWidth(nsString& aWidth)
+  void GetWidth(DOMString& aWidth)
   {
     GetHTMLAttr(nsGkAtoms::width, aWidth);
   }
   void SetWidth(const nsAString& aWidth, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::width, aWidth, aError);
   }
-  void GetBgColor(nsString& aBgColor)
+  void GetBgColor(DOMString& aBgColor)
   {
     GetHTMLAttr(nsGkAtoms::bgcolor, aBgColor);
   }
   void SetBgColor(const nsAString& aBgColor, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::bgcolor, aBgColor, aError);
   }
-  void GetCellPadding(nsString& aCellPadding)
+  void GetCellPadding(DOMString& aCellPadding)
   {
     GetHTMLAttr(nsGkAtoms::cellpadding, aCellPadding);
   }
   void SetCellPadding(const nsAString& aCellPadding, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::cellpadding, aCellPadding, aError);
   }
-  void GetCellSpacing(nsString& aCellSpacing)
+  void GetCellSpacing(DOMString& aCellSpacing)
   {
     GetHTMLAttr(nsGkAtoms::cellspacing, aCellSpacing);
   }
   void SetCellSpacing(const nsAString& aCellSpacing, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::cellspacing, aCellSpacing, aError);
   }
 
--- a/dom/html/HTMLTableRowElement.h
+++ b/dom/html/HTMLTableRowElement.h
@@ -32,49 +32,49 @@ public:
 
   int32_t RowIndex() const;
   int32_t SectionRowIndex() const;
   nsIHTMLCollection* Cells();
   already_AddRefed<nsGenericHTMLElement>
     InsertCell(int32_t aIndex, ErrorResult& aError);
   void DeleteCell(int32_t aValue, ErrorResult& aError);
 
-  void GetAlign(nsString& aAlign)
+  void GetAlign(DOMString& aAlign)
   {
     GetHTMLAttr(nsGkAtoms::align, aAlign);
   }
   void SetAlign(const nsAString& aAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
-  void GetCh(nsString& aCh)
+  void GetCh(DOMString& aCh)
   {
     GetHTMLAttr(nsGkAtoms::_char, aCh);
   }
   void SetCh(const nsAString& aCh, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::_char, aCh, aError);
   }
-  void GetChOff(nsString& aChOff)
+  void GetChOff(DOMString& aChOff)
   {
     GetHTMLAttr(nsGkAtoms::charoff, aChOff);
   }
   void SetChOff(const nsAString& aChOff, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError);
   }
-  void GetVAlign(nsString& aVAlign)
+  void GetVAlign(DOMString& aVAlign)
   {
     GetHTMLAttr(nsGkAtoms::valign, aVAlign);
   }
   void SetVAlign(const nsAString& aVAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError);
   }
-  void GetBgColor(nsString& aBgColor)
+  void GetBgColor(DOMString& aBgColor)
   {
     GetHTMLAttr(nsGkAtoms::bgcolor, aBgColor);
   }
   void SetBgColor(const nsAString& aBgColor, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::bgcolor, aBgColor, aError);
   }
 
--- a/dom/html/HTMLTableSectionElement.h
+++ b/dom/html/HTMLTableSectionElement.h
@@ -24,41 +24,41 @@ public:
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   nsIHTMLCollection* Rows();
   already_AddRefed<nsGenericHTMLElement>
     InsertRow(int32_t aIndex, ErrorResult& aError);
   void DeleteRow(int32_t aValue, ErrorResult& aError);
 
-  void GetAlign(nsString& aAlign)
+  void GetAlign(DOMString& aAlign)
   {
     GetHTMLAttr(nsGkAtoms::align, aAlign);
   }
   void SetAlign(const nsAString& aAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
   }
-  void GetCh(nsString& aCh)
+  void GetCh(DOMString& aCh)
   {
     GetHTMLAttr(nsGkAtoms::_char, aCh);
   }
   void SetCh(const nsAString& aCh, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::_char, aCh, aError);
   }
-  void GetChOff(nsString& aChOff)
+  void GetChOff(DOMString& aChOff)
   {
     GetHTMLAttr(nsGkAtoms::charoff, aChOff);
   }
   void SetChOff(const nsAString& aChOff, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError);
   }
-  void GetVAlign(nsString& aVAlign)
+  void GetVAlign(DOMString& aVAlign)
   {
     GetHTMLAttr(nsGkAtoms::valign, aVAlign);
   }
   void SetVAlign(const nsAString& aVAlign, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError);
   }
 
--- a/dom/html/HTMLTimeElement.cpp
+++ b/dom/html/HTMLTimeElement.cpp
@@ -27,17 +27,17 @@ NS_IMPL_ELEMENT_CLONE(HTMLTimeElement)
 
 JSObject*
 HTMLTimeElement::WrapNode(JSContext* cx)
 {
   return HTMLTimeElementBinding::Wrap(cx, this);
 }
 
 void
-HTMLTimeElement::GetItemValueText(nsAString& text)
+HTMLTimeElement::GetItemValueText(DOMString& text)
 {
   if (HasAttr(kNameSpaceID_None, nsGkAtoms::datetime)) {
     GetDateTime(text);
   } else {
     ErrorResult rv;
     GetTextContentInternal(text, rv);
   }
 }
--- a/dom/html/HTMLTimeElement.h
+++ b/dom/html/HTMLTimeElement.h
@@ -16,27 +16,27 @@ namespace dom {
 
 class HTMLTimeElement MOZ_FINAL : public nsGenericHTMLElement
 {
 public:
   explicit HTMLTimeElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual ~HTMLTimeElement();
 
   // HTMLTimeElement WebIDL
-  void GetDateTime(nsAString& aDateTime)
+  void GetDateTime(DOMString& aDateTime)
   {
     GetHTMLAttr(nsGkAtoms::datetime, aDateTime);
   }
 
   void SetDateTime(const nsAString& aDateTime, ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::datetime, aDateTime, aError);
   }
 
-  virtual void GetItemValueText(nsAString& text) MOZ_OVERRIDE;
+  virtual void GetItemValueText(DOMString& text) MOZ_OVERRIDE;
   virtual void SetItemValueText(const nsAString& text) MOZ_OVERRIDE;
   virtual nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
 
 protected:
   virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE;
 };
 
 } // namespace dom
--- a/dom/html/HTMLTrackElement.h
+++ b/dom/html/HTMLTrackElement.h
@@ -88,21 +88,19 @@ public:
   uint16_t ReadyState() const;
   void SetReadyState(uint16_t aReadyState);
 
   TextTrack* GetTrack();
 
   virtual nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) const MOZ_OVERRIDE;
 
   // For Track, ItemValue reflects the src attribute
-  virtual void GetItemValueText(nsAString& aText) MOZ_OVERRIDE
+  virtual void GetItemValueText(DOMString& aText) MOZ_OVERRIDE
   {
-    DOMString value;
-    GetSrc(value);
-    value.ToString(aText);
+    GetSrc(aText);
   }
   virtual void SetItemValueText(const nsAString& aText) MOZ_OVERRIDE
   {
     ErrorResult rv;
     SetSrc(aText, rv);
   }
 
   // Override ParseAttribute() to convert kind strings to enum values.
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -3029,17 +3029,17 @@ nsGenericHTMLElement::GetItemValue(JSCon
     JS::Rooted<JS::Value> v(aCx);
     JSAutoCompartment ac(aCx, scope);
     if (!mozilla::dom::WrapObject(aCx, this, aRetval)) {
       aError.Throw(NS_ERROR_FAILURE);
     }
     return;
   }
 
-  nsString string;
+  DOMString string;
   GetItemValueText(string);
   if (!xpc::NonVoidStringToJsval(aCx, string, aRetval)) {
     aError.Throw(NS_ERROR_FAILURE);
   }
 }
 
 NS_IMETHODIMP
 nsGenericHTMLElement::GetItemValue(nsIVariant** aValue)
@@ -3050,19 +3050,21 @@ nsGenericHTMLElement::GetItemValue(nsIVa
     out->SetAsEmpty();
     out.forget(aValue);
     return NS_OK;
   }
 
   if (ItemScope()) {
     out->SetAsISupports(static_cast<nsIContent*>(this));
   } else {
-    nsAutoString string;
+    DOMString string;
     GetItemValueText(string);
-    out->SetAsAString(string);
+    nsString xpcomString;
+    string.ToString(xpcomString);
+    out->SetAsAString(xpcomString);
   }
 
   out.forget(aValue);
   return NS_OK;
 }
 
 void
 nsGenericHTMLElement::SetItemValue(JSContext* aCx, JS::Value aValue,
@@ -3093,17 +3095,17 @@ nsGenericHTMLElement::SetItemValue(nsIVa
 
   nsAutoString string;
   aValue->GetAsAString(string);
   SetItemValueText(string);
   return NS_OK;
 }
 
 void
-nsGenericHTMLElement::GetItemValueText(nsAString& text)
+nsGenericHTMLElement::GetItemValueText(DOMString& text)
 {
   ErrorResult rv;
   GetTextContentInternal(text, rv);
 }
 
 void
 nsGenericHTMLElement::SetItemValueText(const nsAString& text)
 {
--- a/dom/html/nsGenericHTMLElement.h
+++ b/dom/html/nsGenericHTMLElement.h
@@ -63,35 +63,35 @@ public:
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMPL_FROMCONTENT(nsGenericHTMLElement, kNameSpaceID_XHTML)
 
   // From Element
   nsresult CopyInnerTo(mozilla::dom::Element* aDest);
 
-  void GetTitle(nsString& aTitle)
+  void GetTitle(mozilla::dom::DOMString& aTitle)
   {
     GetHTMLAttr(nsGkAtoms::title, aTitle);
   }
   NS_IMETHODIMP SetTitle(const nsAString& aTitle) MOZ_OVERRIDE
   {
     SetHTMLAttr(nsGkAtoms::title, aTitle);
     return NS_OK;
   }
-  void GetLang(nsString& aLang)
+  void GetLang(mozilla::dom::DOMString& aLang)
   {
     GetHTMLAttr(nsGkAtoms::lang, aLang);
   }
   NS_IMETHODIMP SetLang(const nsAString& aLang) MOZ_OVERRIDE
   {
     SetHTMLAttr(nsGkAtoms::lang, aLang);
     return NS_OK;
   }
-  void GetDir(nsString& aDir)
+  void GetDir(mozilla::dom::DOMString& aDir)
   {
     GetHTMLEnumAttr(nsGkAtoms::dir, aDir);
   }
   void SetDir(const nsAString& aDir, mozilla::ErrorResult& aError)
   {
     SetHTMLAttr(nsGkAtoms::dir, aDir, aError);
   }
   already_AddRefed<nsDOMStringMap> Dataset();
@@ -291,17 +291,17 @@ public:
     return rcFrame.height;
   }
 
 protected:
   virtual ~nsGenericHTMLElement() {}
 
   // These methods are used to implement element-specific behavior of Get/SetItemValue
   // when an element has @itemprop but no @itemscope.
-  virtual void GetItemValueText(nsAString& text);
+  virtual void GetItemValueText(mozilla::dom::DOMString& text);
   virtual void SetItemValueText(const nsAString& text);
 public:
   virtual already_AddRefed<mozilla::dom::UndoManager> GetUndoManager() MOZ_OVERRIDE;
   virtual bool UndoScope() MOZ_OVERRIDE;
   virtual void SetUndoScope(bool aUndoScope, mozilla::ErrorResult& aError) MOZ_OVERRIDE;
   // Callback for destructor of of dataset to ensure to null out weak pointer.
   nsresult ClearDataset();
 
@@ -313,31 +313,31 @@ public:
   nsSize GetWidthHeightForImage(nsRefPtr<imgRequestProxy>& aImageRequest);
 
   // XPIDL methods
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
 
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   NS_IMETHOD GetTitle(nsAString& aTitle) MOZ_FINAL MOZ_OVERRIDE {
-    nsString title;
+    mozilla::dom::DOMString title;
     GetTitle(title);
-    aTitle.Assign(title);
+    title.ToString(aTitle);
     return NS_OK;
   }
   NS_IMETHOD GetLang(nsAString& aLang) MOZ_FINAL MOZ_OVERRIDE {
-    nsString lang;
+    mozilla::dom::DOMString lang;
     GetLang(lang);
-    aLang.Assign(lang);
+    lang.ToString(aLang);
     return NS_OK;
   }
   NS_IMETHOD GetDir(nsAString& aDir) MOZ_FINAL MOZ_OVERRIDE {
-    nsString dir;
+    mozilla::dom::DOMString dir;
     GetDir(dir);
-    aDir.Assign(dir);
+    dir.ToString(aDir);
     return NS_OK;
   }
   NS_IMETHOD SetDir(const nsAString& aDir) MOZ_FINAL MOZ_OVERRIDE {
     mozilla::ErrorResult rv;
     SetDir(aDir, rv);
     return rv.ErrorCode();
   }
   NS_IMETHOD GetDOMClassName(nsAString& aClassName) MOZ_FINAL {