Bug 628799 (followup) - Fix the ZoomChanged event used by Tzoom tests [r=stechz]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 02 Feb 2011 16:25:42 -0800
changeset 67346 3f3341d2bd07587107bd11380d1fd7f9bb09aa6c
parent 67345 e2054b050332ef94709463e7c53fe4fe28de4da9
child 67347 b0a5cded501eb71a9f0837a65e192c08b2fbecc7
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstechz
bugs628799
Bug 628799 (followup) - Fix the ZoomChanged event used by Tzoom tests [r=stechz]
mobile/chrome/content/bindings/browser.xml
--- a/mobile/chrome/content/bindings/browser.xml
+++ b/mobile/chrome/content/bindings/browser.xml
@@ -1022,35 +1022,36 @@
           rootView._contentView.scrollTo(x, y);
         ]]></body>
       </method>
 
       <!-- After fuzzy zoom, sync the displayport with the new viewport. -->
       <method name="finishFuzzyZoom">
         <body><![CDATA[
           this.getRootView()._updateCacheViewport();
+
+          let event = document.createEvent("Events");
+          event.initEvent("ZoomChanged", true, false);
+          this.dispatchEvent(event);
         ]]></body>
       </method>
 
       <!-- The ratio of CSS pixels to device pixels. -->
       <property name="scale">
         <getter><![CDATA[
           return this.getRootView()._scale;
         ]]></getter>
         <setter><![CDATA[
           if (val <= 0 || val == this.scale)
             return;
 
           let rootView = this.getRootView();
           rootView._setScale(val);
-          rootView._updateCacheViewport();
+          this.finishFuzzyZoom();
 
-          let event = document.createEvent("Events");
-          event.initEvent("ZoomChanged", true, false);
-          this.dispatchEvent(event);
           return val;
         ]]></setter>
       </property>
 
       <method name="_getView">
         <parameter name="contentView"/>
         <body>
           <![CDATA[