Port https://codereview.chromium.org/338523002/ to blink.

BUG=288948
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/418243005

git-svn-id: svn://svn.chromium.org/blink/trunk@179327 bbb929c8-8fbe-4397-9dbb-9b2b20218538