Bug 907495 - Scrollbars cause content to be shifted in e10s (r=kats,mattwoodrow)

This commit is contained in:
Bill McCloskey 2013-08-22 13:18:11 -07:00
parent 13f6ac3ccb
commit dfc3ae2fef

View File

@ -678,6 +678,16 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
mozilla::gfx::IntRect(bounds.x, bounds.y, bounds.width, bounds.height));
}
// Adjust for the size of scroll bars.
if (scrollableFrame) {
nsMargin sizes = scrollableFrame->GetActualScrollbarSizes();
ScreenIntMargin boundMargins(nsPresContext::AppUnitsToIntCSSPixels(sizes.top),
nsPresContext::AppUnitsToIntCSSPixels(sizes.right),
nsPresContext::AppUnitsToIntCSSPixels(sizes.bottom),
nsPresContext::AppUnitsToIntCSSPixels(sizes.left));
metrics.mCompositionBounds.Deflate(boundMargins);
}
metrics.mPresShellId = presShell->GetPresShellId();
aRoot->SetFrameMetrics(metrics);