• David Bokan's avatar
    Fix URL bar clipping with min-scale > 1 · f9cbcfa4
    David Bokan authored
    In https://crrev.com/bf23241073ef806810f2aa90bbb153b639239c81, I rewrote
    UpdateViewportContainerSizes to be compatible with Blink generated
    property trees. As part of this, we now make use of the outer viewport's
    clip node. However, unlike the layer's bounds, the clip node's bounds
    do not include the resize we perform to match the content width of the
    page.
    
    In WebViewImpl::ResizeAfterLayout, we resize the FrameView (and thus the
    LayoutView) after we do a layout. We do this so that the layout viewport
    is sized according to the minimum possible page scale (so pos: fixed
    Elements are in the correct locations when the page is fully zoomed
    out).
    
    However, this isn't accounted for correctly in the ClipNode. This CL
    applies the minimum scale to the clip bounds directly when computing the
    clip as a result of URL bar movement. We should really fix the place
    where the ClipNode is computed but this CL will need to be merged so
    this is a minimal fix.
    
    Note also, the ClipNode is correctly calculated with blink-gen-property-
    trees enabled. This fix is thus only required when that's turned off.
    
    Bug: 898757
    Change-Id: I9c8ea517c2e98b6b2ac552b1ae64bd1675547614
    Reviewed-on: https://chromium-review.googlesource.com/c/1313278Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
    Commit-Queue: David Bokan <bokan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#604932}
    f9cbcfa4
layer_tree_host_impl.cc 221 KB