New issue
Advanced search Search tips

Issue 846322 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 17
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 798719



Sign in to add a comment

position: fixed root scroller interacts poorly with URL bar

Project Member Reported by bokan@chromium.org, May 24 2018

Issue description

Chrome Version: 68.0.3439.0
OS: Android

Repro: https://jsbin.com/lubesedoyo/1/quiet

What steps will reproduce the problem?
(1) Scroll down the page to hide the URL bar

What is the expected result?
The page should stay "stuck" to the URL bar as it hides

What happens instead?
The URL bar hides without moving the page, breaking the illusion that the URL bar is fixed with respect to the content.

See https://github.com/valdrinkoshi/virtual-scroller/issues/82#issuecomment-391658637 for some more details.
 

Comment 1 by bokan@chromium.org, May 24 2018

Additional note, Chrome must be run with --enable-blink-features=SetRootScroller or --enable-experimental-web-platform-features.

Comment 2 by bokan@chromium.org, May 24 2018

Blocking: 798719
Usable repro link: https://output.jsbin.com/pecado/1/quiet
This isn't so much an issue in rootScroller as it is the interaction between the URL bar and fixed elements that have both top and bottom properties set. In that case we prefer sticking to the bottom but I think it'd be more intuitive for that case to use top.
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77b67445ba6e415e8b41b5b6fd5c016c7195206d

commit 77b67445ba6e415e8b41b5b6fd5c016c7195206d
Author: David Bokan <bokan@chromium.org>
Date: Wed Sep 26 23:14:35 2018

Elements with fixed bottom and top stick to top

When an element is position: fixed and specifies a value for bottom, we
want it to stick to the bottom of the viewport as the URL bar hides (and
the renderer is moved up). However, we missed the special case where
both top and bottom are specified. We can't resize the element in real
time but it's more intuitive to have the element stick to the screen
top.

This also exposed an issue in how we raster the area exposed by the URL
bar. Since we don't resize the viewport layers until the finger is
lifted, the raster code needs to adjust the visible rect by the amount
the URL bar is hidden. This was done by always adding the entire top
controls height in the pending tree. This was guarded by an ANDROID
ifdef which meant the test added here didn't get its benefit and
produced unrastered tiles. I removed the ifdef (URL bar hiding is now
also available on ChromeOS) and improved the expansion to make it more
exactly match the amount of extra visible area.

Bug:  846322 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I02700e08e8254a64405c3adb1a7a123b65468f44
Reviewed-on: https://chromium-review.googlesource.com/1235123
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594515}
[modify] https://crrev.com/77b67445ba6e415e8b41b5b6fd5c016c7195206d/cc/layers/picture_layer_impl.cc
[add] https://crrev.com/77b67445ba6e415e8b41b5b6fd5c016c7195206d/third_party/WebKit/LayoutTests/virtual/android/url-bar/bottom-and-top-fixed-sticks-to-top-expected.html
[add] https://crrev.com/77b67445ba6e415e8b41b5b6fd5c016c7195206d/third_party/WebKit/LayoutTests/virtual/android/url-bar/bottom-and-top-fixed-sticks-to-top.html
[modify] https://crrev.com/77b67445ba6e415e8b41b5b6fd5c016c7195206d/third_party/blink/renderer/core/page/chrome_client_impl.cc
[modify] https://crrev.com/77b67445ba6e415e8b41b5b6fd5c016c7195206d/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.cc
[modify] https://crrev.com/77b67445ba6e415e8b41b5b6fd5c016c7195206d/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
[modify] https://crrev.com/77b67445ba6e415e8b41b5b6fd5c016c7195206d/third_party/blink/renderer/core/style/computed_style.h

Status: Fixed (was: Assigned)

Sign in to add a comment