Bug 441589: refresh the display periodically to make it possible to use forms, see DHTML effects, etc., r=mfinkle
authorGavin Sharp <gavin@mozilla.com>
Tue, 24 Jun 2008 21:18:16 -0400
changeset 64728 21482a4f1183c5575ff0cdaff46b4e187f44817d
parent 64727 070ee15767622d8fac25b9a1ff14ac565ab1b5cf
child 64729 a9d05c11439c38eab8a3413754584b20b4c1dc47
push idunknown
push userunknown
push dateunknown
reviewersmfinkle
bugs441589
Bug 441589: refresh the display periodically to make it possible to use forms, see DHTML effects, etc., r=mfinkle
mobile/chrome/content/browser.js
mobile/chrome/content/deckbrowser.xml
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -322,20 +322,20 @@ function ProgressController(aTabBrowser)
 ProgressController.prototype = {
   _browser : null,
 
   init : function(aBrowser) {
     this._browser = aBrowser;
     this._browser.addProgressListener(this, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
 
     // FIXME: until we can get proper canvas repainting hooked up, update the canvas every 300ms
-    //var tabbrowser = this._tabbrowser;
-    //setTimeout(function () {
-    //  tabbrowser.updateCanvasState();
-    //}, 300);
+    var tabbrowser = this._tabbrowser;
+    this._refreshInterval = setInterval(function () {
+      tabbrowser.updateCanvasState();
+    }, 400);
   },
 
   onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
       if (aRequest && aWebProgress.DOMWindow == this._browser.contentWindow) {
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
           if (LocationBar)
             LocationBar.update(TOOLBARSTATE_LOADING);
--- a/mobile/chrome/content/deckbrowser.xml
+++ b/mobile/chrome/content/deckbrowser.xml
@@ -76,17 +76,18 @@
             this.dragData.pageY = 0;
           }
 
           if (this._updateTimeout)
             clearTimeout(this._updateTimeout);
 
           var self = this;
           this._updateTimeout = setTimeout(function () {
-            self._browserToCanvas();
+            if (!self.dragData.dragging)
+              self._browserToCanvas();
           }, 100);
         ]]></body>
       </method>
 
       <method name="_browserToCanvas">
         <body><![CDATA[
           this._updateCanvasPosition();