Bug 441589: refresh the display periodically to make it possible to use forms, see DHTML effects, etc., r=mfinkle
Bug 441589: refresh the display periodically to make it possible to use forms, see DHTML effects, etc., r=mfinkle
--- 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();