[BlinkGenPropertyTrees] Stop using layer position for viewport scrollbars

Both cc::Layer::position and cc::Layer::offset_to_transform_parent (via
GraphicsLayer::SetLayerState) are used for positioning scrollbars in
visual_viewport.cc. Pre-BlinkGenPropertyTrees (BGPT), cc's property tree builder
used cc::Layer::position to set cc::Layer::offset_to_transform_parent. With BGPT
cc::Layer::position is not needed and cc::Layer::offset_to_transform_parent can
be set directly (through GraphicsLayer::SetLayerState). This patch stops using
cc::Layer::SetPosition for BGPT.

This patch has two important parts:
1) The calculations for ScrollbarThickness, ScrollbarSize, and ScrollbarOffset
have been extracted out of VisualViewport::SetupScrollbar.
2) ScrollbarOffset is used in VisualViewport::UpdatePaintPropertyNodesIfNeeded
instead of reading the value from cc::Layer's position.

For debugging, Layer::ToString now lists offset_to_transform_parent because the
position field may not be set with BGPT.

Bug: 911664
Change-Id: I936469091adcdf0760ff81a2d4bea7cfea9ae104
Reviewed-on: https://chromium-review.googlesource.com/c/1396691
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620350}
3 files changed