Bug 1255068 - Add a check for null scrollid. r=kats
MozReview-Commit-ID: 15lbTMb76np
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5471,16 +5471,19 @@ nsIFrame::InvalidateFrameWithRect(const
/*static*/ uint8_t nsIFrame::sLayerIsPrerenderedDataKey;
static bool
DoesLayerHaveOutOfDateFrameMetrics(Layer* aLayer)
{
for (uint32_t i = 0; i < aLayer->GetFrameMetricsCount(); i++) {
const FrameMetrics& metrics = aLayer->GetFrameMetrics(i);
+ if (!metrics.IsScrollable()) {
+ continue;
+ }
nsIScrollableFrame* scrollableFrame =
nsLayoutUtils::FindScrollableFrameFor(metrics.GetScrollId());
if (!scrollableFrame) {
// This shouldn't happen, so let's do the safe thing and trigger a full
// paint if it does.
return true;
}
nsPoint scrollPosition = scrollableFrame->GetScrollPosition();