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

Unified Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
index 2d26db19eb478aa0d1c6e2674f410ce54675e970..ad4d58253fad592257d9449b89e8e1f0967680f4 100644
--- a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
@@ -37,6 +37,7 @@
#include "core/loader/PingLoader.h"
#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
+#include "platform/loader/fetch/ResourceFetcher.h"
#include "platform/network/NetworkHints.h"
#include "platform/weborigin/SecurityPolicy.h"
@@ -305,6 +306,10 @@ void HTMLAnchorElement::SendPings(const KURL& destination_url) const {
!GetDocument().GetSettings()->GetHyperlinkAuditingEnabled())
return;
+ // Pings should not be sent if MHTML page is loaded.
+ if (GetDocument().Fetcher()->Archive())
+ return;
+
UseCounter::Count(GetDocument(), UseCounter::kHTMLAnchorElementPingAttribute);
SpaceSplitString ping_urls(ping_value, SpaceSplitString::kShouldNotFoldCase);
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698