Merge "window.print() should close form validation bubble." to M59

Usually, window.open() deactivates the origin window and validation bubble on the
origin window is closed. However, if window.print() is executed, it suspends message
loop of the window, and deactivation isn't noticed until print dialog is closed.
So, we need to close validation popup explicitly for window.print().

BUG=713686

Review-Url: https://codereview.chromium.org/2834783002
Cr-Commit-Position: refs/heads/master@{#466273}
(cherry picked from commit 9dbd356b0cc52911caef089b09de63572cd9e39f)

Review-Url: https://codereview.chromium.org/2833303002 .
Cr-Commit-Position: refs/branch-heads/3071@{#151}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}
4 files changed