Remove a wrong assert and use Document directly, instead of documentElement()

This is a probable fix for a beta blocker.
See the comment https://bugs.chromium.org/p/chromium/issues/detail?id=594841#c14 for details.

BUG=594841
TEST=None. I can not find any reproducible test yet.

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

Cr-Commit-Position: refs/heads/master@{#381202}
1 file changed