• David Bokan's avatar
    Elements with fixed bottom and top stick to top · 77b67445
    David Bokan authored
    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: default avatarStefan Zager <szager@chromium.org>
    Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#594515}
    77b67445
picture_layer_impl.cc 71.9 KB