Bug 673122 Rotating Fennec to landscape causes checkerboard to appear indefinitely r=mbrubeck

This commit is contained in:
Benjamin Stover 2011-08-18 14:14:44 -07:00
parent c1da87a87b
commit 3f29099ac4
2 changed files with 18 additions and 1 deletions

View File

@ -624,6 +624,13 @@ let ContentScroll = {
left: aEvent.x
});
// Send event only after painting to make sure content views in the parent process have
// been updated.
addEventListener("MozAfterPaint", function afterPaint() {
removeEventListener("MozAfterPaint", afterPaint, false);
sendAsyncMessage("Content:UpdateDisplayPort");
}, false);
break;
}
}

View File

@ -134,7 +134,7 @@
}
break;
case "MozScrolledAreaChanged":
case "MozScrolledAreaChanged": {
self._contentDocumentWidth = json.width;
self._contentDocumentHeight = json.height;
self._contentDocumentLeft = (json.left < 0) ? json.left : 0;
@ -143,6 +143,15 @@
let view = self.getRootView();
view.scrollBy(0, 0);
break;
}
case "Content:UpdateDisplayPort": {
// Recalculate whether the visible area is actually in bounds
let view = self.getRootView();
view.scrollBy(0, 0);
view._updateCacheViewport();
break;
}
}
}
})
@ -572,6 +581,7 @@
this.messageManager.addMessageListener("pagehide", this._messageListenerLocal);
this.messageManager.addMessageListener("DOMPopupBlocked", this._messageListenerLocal);
this.messageManager.addMessageListener("MozScrolledAreaChanged", this._messageListenerLocal);
this.messageManager.addMessageListener("Content:UpdateDisplayPort", this._messageListenerLocal);
this._webProgress._init();