commit | 40c286acc416ea3247743c1ec3dae31702c1943a | [log] [tgz] |
---|---|---|
author | Philip Rogers <pdr@chromium.org> | Mon Jan 07 16:40:49 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jan 07 16:40:49 2019 |
tree | 6607f2aaddf08cf9613b15750601f14f7bb1e78e | |
parent | 3cfef02af63fcf80b788d5e8867f32bc75f4cb7d [diff] |
[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}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .