Bug 1337388 - Remove unnecessary AsyncPanZoomEnabled check, and add a null guard. r=tnikkel
MozReview-Commit-ID: 87zwTEwPyLt
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3389,20 +3389,22 @@ nsLayoutUtils::ExpireDisplayPortOnAsyncS
break;
}
nsIScrollableFrame* scrollAncestor = GetAsyncScrollableAncestorFrame(frame);
if (!scrollAncestor) {
break;
}
frame = do_QueryFrame(scrollAncestor);
MOZ_ASSERT(frame);
+ if (!frame) {
+ break;
+ }
MOZ_ASSERT(scrollAncestor->WantAsyncScroll() ||
frame->PresContext()->PresShell()->GetRootScrollFrame() == frame);
- if (nsLayoutUtils::AsyncPanZoomEnabled(frame) &&
- nsLayoutUtils::HasDisplayPort(frame->GetContent())) {
+ if (nsLayoutUtils::HasDisplayPort(frame->GetContent())) {
scrollAncestor->TriggerDisplayPortExpiration();
// Stop after the first trigger. If it failed, there's no point in
// continuing because all the rest of the frames we encounter are going
// to be ancestors of |scrollAncestor| which will keep its displayport.
// If the trigger succeeded, we stop because when the trigger executes
// it will call this function again to trigger the next ancestor up the
// chain.
break;