Bug 776413: Temporary workaround, fix initial displayport on page load. r=gal

This needs to be fixed properly by setting the displayport to a larger area than
just the viewport but before the page has already been loaded. This patch will
mask it to look decent once the page has finished loading and before panning.
This commit is contained in:
Doug Sherk 2012-07-22 21:51:38 -04:00
parent 5f2e57a806
commit 196cffe61b

View File

@ -717,6 +717,11 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aViewportFr
mFrameMetrics.mResolution.width = 1 / mFrameMetrics.mResolution.width;
mFrameMetrics.mResolution.height = 1 / mFrameMetrics.mResolution.height;
SetPageRect(mFrameMetrics.mCSSContentRect);
// Bug 776413/fixme: Request a repaint as soon as a page is loaded so that
// we get a larger displayport. This is very bad because we're wasting a
// paint and not initializating the displayport correctly.
RequestContentRepaint();
} else if (!mFrameMetrics.mContentRect.IsEqualEdges(aViewportFrame.mContentRect)) {
mFrameMetrics.mCSSContentRect = aViewportFrame.mCSSContentRect;
SetPageRect(mFrameMetrics.mCSSContentRect);