• sreejakshetty@chromium.org's avatar
    Update RenderFrameHost::IsCurrent() · ced590ab
    sreejakshetty@chromium.org authored
    Update the implementation of RenderFrameHost::IsCurrent() to also
    check recursively for current RenderFrameHost and all parents if it is
    the current RenderFrameHost in its FrameTreeNode. More specifically,
    changing the meaning of IsCurrent from "current in the FrameTreeNode"
    to "current in their FrameTreeNodes for its RFH and its parents".
    
    The major problem with the current implementation is that during
    a navigation, new RenderFrameHost replaces the old one in its
    FrameTreeNode but the children are still the current
    ones within their FrameTreeNode as we keep the RFH alive for sometime
    after commit.
    
    In particular, after a navigation from A(B) to C, only A.IsCurrent()
    becomes false. B.IsCurrent() still remains true. With the current
    update now both A.IsCurrent() and B.IsCurrent() would return false
    which is the expected behaviour.
    
    BUG=1058984
    
    Change-Id: I3c22e3e512021c8ca2e8ccc7eed66075700bb632
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2060374
    Commit-Queue: Sreeja Kamishetty <sreejakshetty@chromium.org>
    Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
    Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
    Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#749439}
    ced590ab
render_frame_host_impl.h 124 KB