• Jinsuk Kim's avatar
    Android: Fix a bug of text selection not working in SERP · 6b78be80
    Jinsuk Kim authored
    ChromeActionModeHandler adds an observer for init-web-contents event
    of TabWebContentsObserver for each tab in order to register
    ChromeActionModeCallback to its WebContents, therefore enabling
    floating/toolbar action mode menu.
    
    For newly created tab, there was a bug this registration of the callback
    not working (ok for the tab already created and swapping into
    foreground). It's because init-web-contents event occurs before
    adding an observer(mInitWebContentsObserver) to TabWebContentsObserver,
    missing the chance to register the callback.
    
    This CL manually triggers the mInitWebContentsObserver for all the newly
    created tab to fix the bug. Previously it was applied to only the very
    first tab being added, but now extended to all those the newly created
    and added.
    
    Bug: 1067524
    Change-Id: I511f15363e1e77f13347c5358aaf6eb3874a1a7b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136569Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
    Reviewed-by: default avatarTheresa  <twellington@chromium.org>
    Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#758641}
    6b78be80
chrome_test_java_sources.gni 49 KB