Chromium Code Reviews| Index: Source/core/loader/DocumentLoader.cpp |
| diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp |
| index 260a05303bb5078ae1ef963e6a89da0e2ba25e8d..e468e87a82a3843fea2aa9d787105d648cb38248 100644 |
| --- a/Source/core/loader/DocumentLoader.cpp |
| +++ b/Source/core/loader/DocumentLoader.cpp |
| @@ -608,6 +608,10 @@ bool DocumentLoader::isLoadingInAPISense() const |
| bool DocumentLoader::maybeCreateArchive() |
| { |
| + // Only the top-frame can load MHTML. |
| + if (m_frame->tree().parent()) |
| + return false; |
| + |
| // Give the archive machinery a crack at this document. If the MIME type is not an archive type, it will return 0. |
| if (!isArchiveMIMEType(m_response.mimeType())) |
| return false; |
| @@ -620,6 +624,10 @@ bool DocumentLoader::maybeCreateArchive() |
| return false; |
| } |
| + // No JavaScript allowed in MHTML to prevent access to cookies for example. |
| + if (m_frame->settings()) |
| + m_frame->settings()->setScriptEnabled(false); |
|
abarth-chromium
2014/02/12 22:09:15
Won't this setting persist until after the MHTML h
Jay Civelli
2014/02/12 23:26:40
Ah! Thanks for catching this, I did not realize th
|
| + |
| addAllArchiveResources(m_archive.get()); |
| ArchiveResource* mainResource = m_archive->mainResource(); |