Relativise URLs against target document

mw.Uri will just be using window.document, which may have
a different base.

Depends on I86fe6c2f41e549 in core.

Bug: 58136
Change-Id: I320d5d477d97ebf25963ab2dc429931bc871dd17
Merge "Relativise URLs against target document"