Commit 6d904397 authored by Yi Gu's avatar Yi Gu Committed by Commit Bot

Fix unnecessary property_tree check

PullDeltaForMain() happens right before the commit and is supposed to
return the latest active tree delta. Therefore calling it on a pending
tree doesn't make sense and should never happen.

Bug: 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I80c4e9727d5600dfe701c948e0ae822a8718f731
Reviewed-on: https://chromium-review.googlesource.com/806475
Commit-Queue: Yi Gu <yigu@chromium.org>
Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521428}
parent 285e7d49
......@@ -1351,13 +1351,12 @@ const gfx::ScrollOffset ScrollTree::current_scroll_offset(ElementId id) const {
gfx::ScrollOffset ScrollTree::PullDeltaForMainThread(
SyncedScrollOffset* scroll_offset) {
DCHECK(property_trees()->is_active);
// TODO(miletus): Remove all this temporary flooring machinery when
// Blink fully supports fractional scrolls.
gfx::ScrollOffset current_offset =
scroll_offset->Current(property_trees()->is_active);
gfx::ScrollOffset current_delta = property_trees()->is_active
? scroll_offset->Delta()
: scroll_offset->PendingDelta().get();
scroll_offset->Current(/* is_active_tree */ true);
gfx::ScrollOffset current_delta = scroll_offset->Delta();
gfx::ScrollOffset floored_delta(floor(current_delta.x()),
floor(current_delta.y()));
gfx::ScrollOffset diff_delta = floored_delta - current_delta;
......
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