New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843378 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

MHTML doesn't support saving frames/objects with non-image/html content (e.g. multimedia)

Project Member Reported by lukasza@chromium.org, May 15 2018

Issue description

Repro:

1. Navigate to a webpage containing something like:

  <object data="/cross-site/bar.com/media/bigbuck.webm">err_no_object_data</object>

2. Save the webpage as MHTML.

EXPECTED RESULT: The video is available for offline viewing.

ACTUAL RESULT: The video is unavailable (I would expect similar results for audio, plugins, xml documents).

The generated MHTML looks like this (notice the self-referential/infinite-loop-inducing url):

------MultipartBoundary--Haf6y0Aoye8l1fk1RGpgDmYMd6Tnfi8hXtHDbGUWD1----
Content-Type: text/html
Content-ID: <frame-C7C17F406DB2915513F5DC31FF7EBE2A@mhtml.blink>
Content-Transfer-Encoding: quoted-printable
Content-Location: http://bar.com:41043/media/bigbuck.webm

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3DUTF-8"><meta name=3D"viewport" content=3D"width=3Ddevice-width"></head><=
body><video controls=3D"" autoplay=3D"" name=3D"media"><source src=3D"http:=
//bar.com:41043/media/bigbuck.webm" type=3D"video/webm"></video></body></ht=
ml>
------MultipartBoundary--Haf6y0Aoye8l1fk1RGpgDmYMd6Tnfi8hXtHDbGUWD1------

 
Owner: dim...@chromium.org
dimich@, could you please help with further triage?  I am not sure how important this scenario is for offline pages feature (and I am a bit surprised that we didn't get external reports about this).
Cc: freedjm@chromium.org
Labels: OS-Android
+Jonathan who looked into video embeds in MHTML
Also note the IsHTMLDocument / IsImageDocument checks in FrameSerializer::SerializeFrame (and note the comment rewritten in a WIP CL @ https://chromium-review.googlesource.com/c/chromium/src/+/1060470/2/third_party/blink/renderer/core/exported/web_frame_serializer.cc).
Cc: jianli@chromium.org
I observed this same problem a couple months ago  crbug.com/824567 . 

I was able to manually insert a video into MHTML but inlining it in the main HTML body with a data URI, but none of the controls worked. Although, IIRC Jian was able to get the controls working on a local Canary build.

However this was just a manual test of how to enable video for MHTML, but we decided it was low priority at the time (for Offline Prefetch in particular).
Cc: dim...@chromium.org
Owner: freedjm@chromium.org
Status: Assigned (was: Untriaged)
<triage> Assigning to freedjm@ for MHTML video

Sign in to add a comment