Narrow the scope of page pause when printing. (try 2)
In the current implementation, sometimes the scope of a page's "pause" is too wide compared to the definition in the spec [1], and sometimes it does not pause at all. So narrow the scope to conform to the spec, and apply it consistently to all possible ways users can print. This is based on an earlier CL [2] which only did this for printing with the system dialog, but not for Print Preview. The first attempt at landing this CL [3] got reverted [4] because it caused bf_cache_browser_tests failures. These tests did not run by default as part of the CQ, which is how [3] passed the CQ. To fix this issue, CL [5] landed to make the test less flaky. Another bug [6] uncovered by the original CL [3] is a bit harder to solve. The issue here is the case where PrintRenderFrameHelper tries to unpause during blink::WebLocalFrameImpl teardown, and it is happening too late. To address this, introduce blink::WebPrintClient, so the WebLocalFrameImpl can tell the WebPrintClient (PrintRenderFrameHelper, really) that it will be destroyed. Then PrintRenderFrameHelper can unpause at the correct time. [1] https://html.spec.whatwg.org/C/#printing-steps [2] https://crrev.com/c/1669250 [3] https://crrev.com/797120 [4] https://crrev.com/797234 [5] https://crrev.com/799501 [6] https://crbug.com/1115475 CQ_INCLUDE_TRYBOTS=luci.chromium.try:android-bfcache-rel CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-bfcache-rel Bug: 956832 Change-Id: Ie328d90094f1b282126d51425200f8810819c3c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353886Reviewed-by:Calder Kitagawa <ckitagawa@chromium.org> Reviewed-by:
Kent Tamura <tkent@chromium.org> Reviewed-by:
Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#799772}
Showing
This diff is collapsed.
Please register or sign in to comment