New issue
Advanced search Search tips

Issue 915982 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Saving target.com as MHTML does not restore the original look

Project Member Reported by jianli@chromium.org, Dec 18

Issue description

Status: Available (was: Untriaged)
Cc: davidjm@chromium.org wychen@chromium.org
Status: Assigned (was: Available)
I suspect issue 892492 could be the root cause.
There're 2 issues with not serializing target.com well:
1) The style tag that contained inline stylesheet but got removed later is not serialized correctly.
2) Picture element is not serialized correctly.

Issue 1 is same as crbug.com/892492.

For the <picture> element, the main issue is that srcset attribute is not used when opening MHTML, so there is no point serializing it, right? In the case of target.com, the <img> inside <picture> doesn't have a fallback src attribute. One possible workaround is to copy one (preferably the one that is shown) of the srcset in <source> elements to the fallback src, so that we can save and show it somewhat reasonably. WDYT?
Yes, it is like what you commented in #4 to fix <picture> issue, but we have more things to fix:
1) We need to add src attribute (or replace it if existed) to the image element inside picture element.
2) In FrameSerializer::SerializeFrame, we need to use image->ImageSourceURL() instead of image->getAttribute(html_names::kSrcAttr) in generating image resource data. This is because ImageSourceURL() returns |best_fit_image_url_| that could be pulled from the best fit source sibling element.



Sign in to add a comment