Bug 848939 - De-field marquee. r=jaws
authorBobby Holley <bobbyholley@gmail.com>
Mon, 18 Mar 2013 20:32:02 -0700
changeset 125352 254cde8d39744f5a785ff253e6d2fe077efd86d6
parent 125351 01207a5deca5dcd068639557e66709ed7b5c9ebd
child 125353 c5389284d0ad9198de38d64d2e9cf085238a7f32
push id24886
push userbobbyholley@gmail.com
push dateTue, 19 Mar 2013 03:34:10 +0000
treeherdermozilla-inbound@254cde8d3974 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs848939
milestone22.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 848939 - De-field marquee. r=jaws
layout/style/xbl-marquee/xbl-marquee.xml
--- a/layout/style/xbl-marquee/xbl-marquee.xml
+++ b/layout/style/xbl-marquee/xbl-marquee.xml
@@ -12,34 +12,32 @@
 
   <binding id="marquee">
 
     <resources>
       <stylesheet src="chrome://xbl-marquee/content/xbl-marquee.css"/>
     </resources>
     <implementation>
 
-      <field name="_scrollAmount">6</field>
       <property name="scrollAmount">
         <getter>
           <![CDATA[
           var val = parseInt(this.getAttribute("scrollamount"));
 
           if (val <= 0 || isNaN(val))
             return this._scrollAmount;
 
           return val;
           ]]>
         </getter>
         <setter>
           this.setAttribute("scrollamount", val);
         </setter>
       </property>
 
-      <field name="_scrollDelay">85</field>
       <property name="scrollDelay">
         <getter>
           <![CDATA[
           var val = parseInt(this.getAttribute("scrolldelay"));
 
           if (val <= 0 || isNaN(val))
             return this._scrollDelay;
 
@@ -74,28 +72,25 @@
         <getter>
           return this.getAttribute("direction");
         </getter>
         <setter>
           this.setAttribute("direction", val);
         </setter>
       </property>
 
-      <field name="_direction">"left"</field>
-
       <property name="behavior">
         <getter>
           return this._behavior;
         </getter>
         <setter>
           this.setAttribute("behavior", val);
         </setter>
       </property>
 
-      <field name="_behavior">"scroll"</field>
 
       <property name="loop">
         <getter>
           <![CDATA[
           var val = parseInt(this.getAttribute('loop'));
     
           if (val < -1 || isNaN(val))
             return this._loop;
@@ -103,63 +98,47 @@
           return val;
           ]]>
         </getter>
         <setter>
           this.setAttribute("loop", val);
         </setter>
       </property>
 
-      <field name="_loop">-1</field>
 
       <property name="onstart">
         <getter>
           return this.getAttribute("onstart");
         </getter>
         <setter>
           this._setEventListener("start", val, true);
           this.setAttribute("onstart", val);
         </setter>
       </property>
 
-      <field name="_onstart"></field>
-
       <property name="onfinish">
         <getter>
           return this.getAttribute("onfinish");
         </getter>
         <setter>
           this._setEventListener("finish", val, true);
           this.setAttribute("onfinish", val);
         </setter>
       </property>
 
-      <field name="_onfinish"></field>
-
       <property name="onbounce">
         <getter>
           return this.getAttribute("onbounce");
         </getter>
         <setter>
           this._setEventListener("bounce", val, true);
           this.setAttribute("onbounce", val);
         </setter>
       </property>
 
-      <field name="_onbounce"></field>
-
-      <field name="dirsign">1</field>
-      <field name="startAt">0</field>
-      <field name="stopAt">0</field>
-      <field name="newPosition">0</field>
-      <field name="runId">0</field>
-
-      <field name="originalHeight">0</field>
-      <field name="startNewDirection">true</field>
-
       <property name="outerDiv"
         onget="return document.getAnonymousNodes(this)[0]"
       />
 
       <property name="innerDiv"
         onget="return document.getAnonymousElementByAttribute(this, 'class', 'innerDiv');"
       />
 
@@ -505,16 +484,30 @@
 
           this._doMove(true);
         ]]>
         </body>
       </method>
 
       <constructor>
         <![CDATA[
+          // Set up state.
+          this._scrollAmount = 6;
+          this._scrollDelay = 85;
+          this._direction = "left";
+          this._behavior = "scroll";
+          this._loop = -1;
+          this.dirsign = 1;
+          this.startAt = 0;
+          this.stopAt = 0;
+          this.newPosition = 0;
+          this.runId = 0;
+          this.originalHeight = 0;
+          this.startNewDirection = true;
+
           // hack needed to fix js error, see bug 386470
           var myThis = this;
           var lambda = function myScopeFunction() { if (myThis.init) myThis.init(); }
 
           this._set_direction(this.getAttribute('direction'));
           this._set_behavior(this.getAttribute('behavior'));
           this._set_scrollDelay(this.getAttribute('scrolldelay'));
           this._set_scrollAmount(this.getAttribute('scrollamount'));