diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 10:22:43 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:36:28 +0000 |
commit | 271a6c3487a14599023a9106329505597638d793 (patch) | |
tree | e040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/third_party/blink/renderer/core/exported/web_frame_serializer.cc | |
parent | 7b2ffa587235a47d4094787d72f38102089f402a (diff) | |
download | qtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz |
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/exported/web_frame_serializer.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/exported/web_frame_serializer.cc | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/chromium/third_party/blink/renderer/core/exported/web_frame_serializer.cc b/chromium/third_party/blink/renderer/core/exported/web_frame_serializer.cc index 528f319b0d7..ded2118ea44 100644 --- a/chromium/third_party/blink/renderer/core/exported/web_frame_serializer.cc +++ b/chromium/third_party/blink/renderer/core/exported/web_frame_serializer.cc @@ -64,7 +64,7 @@ #include "third_party/blink/renderer/core/loader/frame_loader.h" #include "third_party/blink/renderer/core/page/chrome_client.h" #include "third_party/blink/renderer/core/page/page.h" -#include "third_party/blink/renderer/platform/histogram.h" +#include "third_party/blink/renderer/platform/instrumentation/histogram.h" #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_request.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_response.h" @@ -105,7 +105,7 @@ class MHTMLFrameSerializerDelegate final : public FrameSerializer::Delegate { MHTMLFrameSerializerDelegate( WebFrameSerializer::MHTMLPartsGenerationDelegate&, HeapHashSet<WeakMember<const Element>>&); - ~MHTMLFrameSerializerDelegate() override; + ~MHTMLFrameSerializerDelegate() override = default; bool ShouldIgnoreElement(const Element&) override; bool ShouldIgnoreAttribute(const Element&, const Attribute&) override; bool RewriteLink(const Element&, String& rewritten_link) override; @@ -135,14 +135,6 @@ MHTMLFrameSerializerDelegate::MHTMLFrameSerializerDelegate( shadow_template_elements_(shadow_template_elements), popup_overlays_skipped_(false) {} -MHTMLFrameSerializerDelegate::~MHTMLFrameSerializerDelegate() { - if (web_delegate_.RemovePopupOverlay()) { - UMA_HISTOGRAM_BOOLEAN( - "PageSerialization.MhtmlGeneration.PopupOverlaySkipped", - popup_overlays_skipped_); - } -} - bool MHTMLFrameSerializerDelegate::ShouldIgnoreElement(const Element& element) { if (ShouldIgnoreHiddenElement(element)) return true; @@ -235,8 +227,11 @@ bool MHTMLFrameSerializerDelegate::ShouldIgnoreAttribute( // images, as only the value of src is pulled into the archive. Discarding // srcset prevents the problem. Long term we should make sure to MHTML plays // nicely with srcset. - if (attribute.LocalName() == html_names::kSrcsetAttr) + if (IsHTMLImageElement(element) && + (attribute.LocalName() == html_names::kSrcsetAttr || + attribute.LocalName() == html_names::kSizesAttr)) { return true; + } // Do not save ping attribute since anyway the ping will be blocked from // MHTML. @@ -406,7 +401,7 @@ WebThreadSafeData WebFrameSerializer::GenerateMHTMLHeader( scoped_refptr<RawData> buffer = RawData::Create(); MHTMLArchive::GenerateMHTMLHeader( boundary, document->Url(), document->title(), - document->SuggestedMIMEType(), WTF::Time::Now(), *buffer->MutableData()); + document->SuggestedMIMEType(), base::Time::Now(), *buffer->MutableData()); return WebThreadSafeData(buffer); } |