[quickview] Render text content documents the same way always
CL:720656 injected CSS into the QuickView <webview> for PDF/Text. PDF does not inject CSS after CL:1933850 and moreover, keeps the <webview> transparent. We can use that fact to fix the text file rendering issue introduced by CL:720656. From https://bugs.chromium.org/p/chromium/issues/detail?id=742944#c37, using webview.insertCSS() sometimes works, and sometimes does not, due to <webview> permissions check races. And the result is different text renderings of the same text file, depending on race results. The cause is calling insertCSS in the loadstart event i.e., too early. Delay it until contentload fires; that avoids the permissions race. Bug: 742944 No-try: true Change-Id: I0c637d5366ee6cf3448c65035b2932a62f925d91 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933859Reviewed-by:Austin Tankiang <austinct@chromium.org> Reviewed-by:
Noel Gordon <noel@chromium.org> Commit-Queue: Austin Tankiang <austinct@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#718529}
Showing
Please register or sign in to comment