Saving target.com as MHTML does not restore the original look |
||
Issue description
,
Dec 20
I suspect issue 892492 could be the root cause.
,
Dec 20
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.
,
Dec 20
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?
,
Dec 20
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 |
||
Comment 1 by jianli@chromium.org
, Dec 18