• Ehsan Karamad's avatar
    Guest InnerWebContentses should always be attached · 6beb2ea9
    Ehsan Karamad authored
    The API WebContentsImpl::GetInnerWebContents() returns two types of
    WebContentses: the first type which are attached using
    AttachToOuterContentsFrame, and legacy type which are based on
    BrowserPlugin.
    
    Similarly, WebContentsImpl::GetOuterWebContents() has a different
    behavior depending on the type of the GuestView. Specifcally, if the
    WebContents is for a BrowserPlugin-based GuestView, then
    GetOuterWebContents() will return nullptr until BrowserPluginGuest is
    attached. This means GetInnerWebContents() might return WebContentsImpls
    whose BrowserPluginGuest is not still attached which is incorrect.
    
    This issue seems to have caused a bug in find-in-page where there is a
    MimeHandlerViewGuest in the page.
    
    Bug: 897465
    Change-Id: I1fc9b209cf5d1835e2aee311e36da15526c249c4
    Reviewed-on: https://chromium-review.googlesource.com/c/1323904Reviewed-by: default avatarLucas Gadani <lfg@chromium.org>
    Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
    Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#610735}
    6beb2ea9
web_contents_impl.h 81.3 KB