Backed out changeset c33204e69e49 (bug 1743045) for causing failures at scroll-behavior-3.html. CLOSED TREE

This commit is contained in:
Butkovits Atila
2023-02-22 01:15:14 +02:00
parent 198edc7e8c
commit 1267035bef
6 changed files with 54 additions and 184 deletions

View File

@@ -3517,12 +3517,10 @@ static void ScrollToShowRect(nsIScrollableFrame* aFrameAsScrollable,
}
ScrollMode scrollMode = ScrollMode::Instant;
// Use "auto" or "smooth" from the scroll flags as the preferred scroll
// behavior. If the user has disabled smooth scrolls, the following call
// should indicate that we should not conduct a smooth scroll.
bool smoothScroll = aFrameAsScrollable->IsSmoothScroll(
(aScrollFlags & ScrollFlags::ScrollSmooth) ? ScrollBehavior::Smooth
: ScrollBehavior::Auto);
bool autoBehaviorIsSmooth = aFrameAsScrollable->IsSmoothScroll();
bool smoothScroll =
(aScrollFlags & ScrollFlags::ScrollSmooth) ||
((aScrollFlags & ScrollFlags::ScrollSmoothAuto) && autoBehaviorIsSmooth);
if (smoothScroll) {
scrollMode = ScrollMode::SmoothMsd;
}