Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/WebKit/Source/web/WebFrameSerializer.cpp

Issue 2848953003: Do not send pings for anchor elements in MHTML pages (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebFrameSerializer.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameSerializer.cpp b/third_party/WebKit/Source/web/WebFrameSerializer.cpp
index e5a0d1fce3f19fe0b1b51f532f1119134e0e52e5..706ed048be0bc05b8896f53f55c6d5bbc47dca72 100644
--- a/third_party/WebKit/Source/web/WebFrameSerializer.cpp
+++ b/third_party/WebKit/Source/web/WebFrameSerializer.cpp
@@ -195,6 +195,13 @@ bool MHTMLFrameSerializerDelegate::ShouldIgnoreAttribute(
if (attribute.LocalName() == HTMLNames::srcsetAttr)
return true;
+ // Do not save ping attribute since anyway the ping will be blocked from
+ // MHTML.
+ if (isHTMLAnchorElement(element) &&
+ attribute.LocalName() == HTMLNames::pingAttr) {
+ return true;
+ }
+
// If srcdoc attribute for frame elements will be rewritten as src attribute
// containing link instead of html contents, don't ignore the attribute.
// Bail out now to avoid the check in Element::isScriptingAttribute.

Powered by Google App Engine
This is Rietveld 408576698