Cherry-pick [Bug 21971]

Pulling:
https://github.com/w3c/html/commit/72d8faaa484bc35c3b4d208ef4a1c0b1c9b5c767
into the CR branch