Manually propagate sandbox flags to documents transformed by XSLT

Normally, this would Just Work but the combination of MHTML and XSLT
ends up resulting in a weird interaction. MHTML enforces sandbox flags
on a per-document basis, rather than forcing them on the frame: this
makes sense, since the sandbox flags enforced by a MHTML document should
not apply on subsequent pages. However, XSLT installs a new document to
hold the transformed content. When installing a new Document, the
effective sandbox flags from the FrameLoader are applied--but MHTML only
applied them to the Document, so FrameLoader doesn't know about them.
This fix is to manually propagate the flags for XSLT...

Bug: 762930
Change-Id: I29efb0713195febb1ff4e8af7fd27ba1230abab4
Reviewed-by: Kouhei Ueno <>
Commit-Queue: Daniel Cheng <>
Cr-Commit-Position: refs/heads/master@{#500510}
3 files changed