• David Bokan's avatar
    Use FrameView rect for IntersectionObserver root · 3fba0d48
    David Bokan authored
    This bug occurs because of Clank's "resize main frame after layout"
    behavior. In a nutshell: we want users to be able to zoom out to that
    the entire width of the content fits on screen. Because we can't zoom
    out further than the layout viewport (i.e. the main FrameView), after
    a layout occurs we resize the main FrameView to match the content width.
    This leaves us in an interesting situation - the viewport scroller is
    actually larger than the initial containing block (i.e. the LayoutView
    size). This situation cannot occur on desktop and generally doesn't
    occur on well-behaved mobile sites (sites that don't allow zoom out).
    
    The bug was occuring because the intersection observer used the
    LayoutView/ICB size for the root element. This is incorrect in the
    situation described above. We should really use the ViewRect which is
    the scroller bounds.
    
    Bug: 836408
    Change-Id: I96029cdb11a6a16353d5b8b628b0182c13926a8d
    Reviewed-on: https://chromium-review.googlesource.com/1031118Reviewed-by: default avatarStefan Zager <szager@chromium.org>
    Commit-Queue: David Bokan <bokan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#554661}
    3fba0d48
VirtualTestSuites 19.7 KB