Bug 976272. Use DOMString for HTMLElement.className, and mark it as [Pure]. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 25 Feb 2014 17:26:16 -0500
changeset 170580 058d484e50349fe461d44a1501f96ce76b93ddf9
parent 170570 a21fc292b2eac11ef03e18675d98c8ceb17adf52
child 170581 c35458a437cc41eb755a774c2fdc5165c194ae09
push id26293
push usercbook@mozilla.com
push dateWed, 26 Feb 2014 11:47:28 +0000
treeherdermozilla-central@3513449fb9c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs976272
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 976272. Use DOMString for HTMLElement.className, and mark it as [Pure]. r=smaug
content/html/content/src/nsGenericHTMLElement.h
dom/webidl/HTMLElement.webidl
--- a/content/html/content/src/nsGenericHTMLElement.h
+++ b/content/html/content/src/nsGenericHTMLElement.h
@@ -255,17 +255,17 @@ public:
   using nsINode::GetOn##name_;                                                \
   using nsINode::SetOn##name_;                                                \
   already_AddRefed<mozilla::dom::EventHandlerNonNull> GetOn##name_();         \
   void SetOn##name_(mozilla::dom::EventHandlerNonNull* handler);
 #include "nsEventNameList.h" // IWYU pragma: keep
 #undef ERROR_EVENT
 #undef FORWARDED_EVENT
 #undef EVENT
-  void GetClassName(nsString& aClassName)
+  void GetClassName(mozilla::dom::DOMString& aClassName)
   {
     GetAttr(kNameSpaceID_None, nsGkAtoms::_class, aClassName);
   }
   void SetClassName(const nsAString& aClassName)
   {
     SetAttr(kNameSpaceID_None, nsGkAtoms::_class, aClassName, true);
   }
   mozilla::dom::Element* GetOffsetParent()
--- a/dom/webidl/HTMLElement.webidl
+++ b/dom/webidl/HTMLElement.webidl
@@ -72,16 +72,17 @@ interface HTMLElement : Element {
   //readonly attribute boolean? commandChecked;
 
   // styling
   [PutForwards=cssText, Constant]
   readonly attribute CSSStyleDeclaration style;
 
   // Mozilla specific stuff
   // FIXME Bug 810677 Move className from HTMLElement to Element
+  [Pure]
            attribute DOMString className;
 
            attribute EventHandler oncopy;
            attribute EventHandler oncut;
            attribute EventHandler onpaste;
 };
 
 // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface