Bug 1739541 - Set TriggerByScript::Yes for Element.scrollIntoView. r=botond
We'd want to differentiate Element.scrollIntoView call as `triggeredByScript`. Differential Revision: https://phabricator.services.mozilla.com/D130419
This commit is contained in:
@@ -3485,7 +3485,10 @@ static void ScrollToShowRect(nsIScrollableFrame* aFrameAsScrollable,
|
||||
aFrameAsScrollable->ScrollTo(scrollPt, scrollMode, &allowedRange,
|
||||
aScrollFlags & ScrollFlags::ScrollSnap
|
||||
? nsIScrollbarMediator::ENABLE_SNAP
|
||||
: nsIScrollbarMediator::DISABLE_SNAP);
|
||||
: nsIScrollbarMediator::DISABLE_SNAP,
|
||||
aScrollFlags & ScrollFlags::TriggeredByScript
|
||||
? ScrollTriggeredByScript::Yes
|
||||
: ScrollTriggeredByScript::No);
|
||||
if (!weakFrame.IsAlive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user