Commit 579fbe58 authored by szager's avatar szager Committed by Commit bot

Don't update main thread scroll reasons on a throttled frame.

When a frame is throttled, its compositing state cannot be queried,
so don't try to set main thread scrolling reasons.  This fixes
DCHECK failures when root layer scrolling is enabled.

BUG=490942
TEST=FrameThrottlingTest with RLS enabled
R=skobes@chromium.org

Review-Url: https://codereview.chromium.org/2662153004
Cr-Commit-Position: refs/heads/master@{#447962}
parent 29380635
...@@ -4889,10 +4889,13 @@ void FrameView::updateSubFrameScrollOnMainReason( ...@@ -4889,10 +4889,13 @@ void FrameView::updateSubFrameScrollOnMainReason(
if (!frame.isLocalFrame()) if (!frame.isLocalFrame())
return; return;
if (!toLocalFrame(frame).view()->layerForScrolling()) FrameView& frameView = *toLocalFrame(frame).view();
if (frameView.shouldThrottleRendering())
return;
if (!frameView.layerForScrolling())
return; return;
reasons |= toLocalFrame(frame).view()->mainThreadScrollingReasonsPerFrame(); reasons |= frameView.mainThreadScrollingReasonsPerFrame();
if (GraphicsLayer* layerForScrolling = toLocalFrame(frame) if (GraphicsLayer* layerForScrolling = toLocalFrame(frame)
.view() .view()
->layoutViewportScrollableArea() ->layoutViewportScrollableArea()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment