mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-13 07:24:47 +00:00
Bug 1562105 - Bail out if the style frame for the scrollable frame is null in ScrollFrameHelper::IsSmoothScroll. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D36303 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
b53fa7eb49
commit
cc47e0d6ef
6
layout/generic/crashtests/1562105.html
Normal file
6
layout/generic/crashtests/1562105.html
Normal file
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
document.documentElement.hidden = 'true'
|
||||
window.scrollBy(9, 13)
|
||||
})
|
||||
</script>
|
@ -734,3 +734,4 @@ load 1542441.html
|
||||
pref(layout.css.grid-template-subgrid-value.enabled,true) load 1553824.html
|
||||
load 1346454-1.html
|
||||
load 1346454-2.html
|
||||
load 1562105.html
|
||||
|
@ -7161,8 +7161,15 @@ bool ScrollFrameHelper::SmoothScrollVisual(
|
||||
}
|
||||
|
||||
bool ScrollFrameHelper::IsSmoothScroll(dom::ScrollBehavior aBehavior) const {
|
||||
return aBehavior == dom::ScrollBehavior::Smooth ||
|
||||
(aBehavior == dom::ScrollBehavior::Auto &&
|
||||
GetFrameForStyle()->StyleDisplay()->mScrollBehavior ==
|
||||
if (aBehavior == dom::ScrollBehavior::Smooth) {
|
||||
return true;
|
||||
}
|
||||
|
||||
nsIFrame* styleFrame = GetFrameForStyle();
|
||||
if (!styleFrame) {
|
||||
return false;
|
||||
}
|
||||
return (aBehavior == dom::ScrollBehavior::Auto &&
|
||||
styleFrame->StyleDisplay()->mScrollBehavior ==
|
||||
NS_STYLE_SCROLL_BEHAVIOR_SMOOTH);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user