• Ken Buchanan's avatar
    Allow select popups to check viewport position within OOPIFs · af20a60e
    Ken Buchanan authored
    Select menu dropdowns use LocalFrameView::ContentsToViewport to
    determine what part of the menu intersects with the window viewport.
    This doesn't work in OOPIFs because LFV::ContentsToRootFrame only
    converts coordinates into the local frame root's coordinates, not the
    main frame. The consequence is that menus in large iframes that have
    been scrolled into view will falsely report to be out of view.
    
    This patch changes the intersection calculation to use
    LayoutView::MapToVisualRectInAncestorSpace(), which determines the
    viewport intersection while accounting for OOPIF containers.
    
    Bug: 837639
    Change-Id: If265e24ad4cbee967fdb97ae85002a81e75033a7
    Reviewed-on: https://chromium-review.googlesource.com/1036232Reviewed-by: default avatarSteve Kobes <skobes@chromium.org>
    Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
    Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
    Commit-Queue: Charlie Reis <creis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#556355}
    af20a60e
content_browser_test_utils_internal.cc 17 KB