Bug 1544060 - Bail out from ScrollFrameHelper::GetScrollPadding in the case where no corresponding frame exists. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D27423

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2019-04-15 21:15:53 +00:00
parent b2485b123d
commit 8e33d53a3c
3 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1 @@
<html hidden style="scroll-snap-type:both proximity!important"></html>

View File

@ -729,3 +729,4 @@ load 1520798-1.xul
load 1520798-2.html
load 1539656.html
load 1544060-1.html
load 1544060-2.html

View File

@ -6785,7 +6785,10 @@ nsMargin ScrollFrameHelper::GetScrollPadding() const {
} else {
styleFrame = mOuter;
}
MOZ_ASSERT(styleFrame);
if (!styleFrame) {
return nsMargin();
}
// The spec says percentage values are relative to the scroll port size.
// https://drafts.csswg.org/css-scroll-snap-1/#scroll-padding