Bug 1858984 - Fix ComputeNeedToScroll with large line sizes. r=emilio,devtools-reviewers,ochameau
When the line scroll amount is larger than that of the rectangle to scroll into view, do not use the line size to determine if we should scroll. Depends on D192869 Differential Revision: https://phabricator.services.mozilla.com/D192870
This commit is contained in:
@@ -3326,6 +3326,13 @@ static bool ComputeNeedToScroll(WhenToScroll aWhenToScroll, nscoord aLineSize,
|
||||
// The caller wants the frame as visible as possible
|
||||
return true;
|
||||
case WhenToScroll::IfNotVisible:
|
||||
if (aLineSize > (aRectMax - aRectMin)) {
|
||||
// If the line size is greater than the size of the rect
|
||||
// to scroll into view, do not use the line size to determine
|
||||
// if we need to scroll.
|
||||
aLineSize = 0;
|
||||
}
|
||||
|
||||
// Scroll only if no part of the frame is visible in this view.
|
||||
return aRectMax - aLineSize <= aViewMin ||
|
||||
aRectMin + aLineSize >= aViewMax;
|
||||
|
||||
Reference in New Issue
Block a user