This is a rebase of #7842 that also adds a test. Fixes #4183. @Yoric, how's this look to you? Source-Repo: https://github.com/servo/servo Source-Revision: af1690f3036bc329101bbd6f4e877672d58ca5e0
<table width>
<center>