• Mikel Astiz's avatar
    Revert "Populate the distilled content slightly earlier" · dd2af710
    Mikel Astiz authored
    This reverts commit 1dc90fac.
    
    Reason for revert: suspect for causing flakes in
    DomDistillerViewerSourceBrowserTest.PrefPersist
    
    BUG=1004663
    
    Original change's description:
    > Populate the distilled content slightly earlier
    > 
    > Before this CL, the distilled content is injected on DidFinishLoad(),
    > or when the distillation finishes if it's later than DidFinishLoad().
    > When the DidFinishLoad() event propagates to TalkBack, the distilled
    > content is usually not there yet, so TalkBack would announce the
    > content of the place-holding page.
    > 
    > This CL populates the distilled content in DocumentLoadedInFrame()
    > instead of DidFinishLoad(). DocumentLoadedInFrame() is late enough to
    > execute JavaScript, and is early enough so that it's more likely that
    > the title and content can be picked up by TalkBack instead of the
    > placeholder.
    > 
    > If distillation is finished by DocumentLoadedInFrame(), onload() event
    > would also be delayed, so that the accessibility focus is more likely
    > to be on the web content. Otherwise, the focus is usually on the close
    > button of the CustomTab (CCT), or nowhere.
    > 
    > Note that this CL doesn't guarantee the distilled title is announced
    > by TalkBack. If distillation finishes later than
    > DocumentLoadedInFrame(), or if for some reason the accessibility focus
    > is on the close button of the CCT, the title would go unannounced like
    > before.
    > 
    > Bug: 811417, 803474
    > Change-Id: Iaf2ff988b427ca9af582622597b505e7a8aca8e1
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791048
    > Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
    > Reviewed-by: Matthew Jones <mdjones@chromium.org>
    > Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#697074}
    
    TBR=dmazzoni@chromium.org,mdjones@chromium.org,wychen@chromium.org
    
    Change-Id: I6af4de1fa2a872402f9abe13321f5d1af8e09d75
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 811417, 803474
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807495Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#697128}
    dd2af710
tab_utils_browsertest.cc 8.52 KB