Commit e86ca5e9 authored by Robert Flack's avatar Robert Flack Committed by Commit Bot

Guard PaintLayerScrollableArea functions used through ScrollableArea

ScrollAnimator continues to call ShouldUseIntegerScrollOffset and
UpdateScrollOffset indirectly through the base class ScrollableArea.

Bug: 815135
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I495f8ae408022b4e170b17b4392480224cd8114e
Reviewed-on: https://chromium-review.googlesource.com/935041Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539231}
parent 4d4df345
......@@ -298,10 +298,12 @@ GraphicsLayer* PaintLayerScrollableArea::LayerForScrollCorner() const {
}
bool PaintLayerScrollableArea::ShouldUseIntegerScrollOffset() const {
Frame* frame = GetLayoutBox()->GetFrame();
if (frame->GetSettings() &&
!frame->GetSettings()->GetPreferCompositingToLCDTextEnabled())
return true;
if (!HasBeenDisposed()) {
Frame* frame = GetLayoutBox()->GetFrame();
if (frame->GetSettings() &&
!frame->GetSettings()->GetPreferCompositingToLCDTextEnabled())
return true;
}
return ScrollableArea::ShouldUseIntegerScrollOffset();
}
......@@ -430,7 +432,7 @@ int PaintLayerScrollableArea::ScrollSize(
void PaintLayerScrollableArea::UpdateScrollOffset(
const ScrollOffset& new_offset,
ScrollType scroll_type) {
if (GetScrollOffset() == new_offset)
if (HasBeenDisposed() || GetScrollOffset() == new_offset)
return;
bool offset_was_zero = scroll_offset_.IsZero();
......
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