зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1277814 - For a zero-margin displayport, do not expand the displayport beyond the scroll port even during low-res painting. r=tnikkel
MozReview-Commit-ID: 4ZN8aWkBEwA --HG-- extra : source : d2f7c22e3148aae47a48cde83ee359fb77479390
This commit is contained in:
Родитель
06d34b07af
Коммит
2bb2c4fc24
|
@ -1122,8 +1122,12 @@ GetDisplayPortFromMarginsData(nsIContent* aContent,
|
|||
// Convert the aligned rect back into app units.
|
||||
nsRect result = LayoutDeviceRect::ToAppUnits(screenRect / res, auPerDevPixel);
|
||||
|
||||
// Expand it for the low-res buffer if needed
|
||||
result = ApplyRectMultiplier(result, aMultiplier);
|
||||
// If we have non-zero margins, expand the displayport for the low-res buffer
|
||||
// if that's what we're drawing. If we have zero margins, we want the
|
||||
// displayport to reflect the scrollport.
|
||||
if (aMarginsData->mMargins != ScreenMargin()) {
|
||||
result = ApplyRectMultiplier(result, aMultiplier);
|
||||
}
|
||||
|
||||
// Make sure the displayport remains within the scrollable rect.
|
||||
result = result.MoveInsideAndClamp(expandedScrollableRect - scrollPos);
|
||||
|
|
Загрузка…
Ссылка в новой задаче