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 b9c7b1b58823f7e66e472f461885c38cae188e73..98fccec2751a80bed96aec0c7e0179396e01e8b5 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; |
Mike West
2017/05/02 07:43:21
What about other things that go through `PingLoade
jianli
2017/05/03 21:15:17
I don't think other types of pings/beacons can be
|
+ |
UseCounter::Count(GetDocument(), UseCounter::kHTMLAnchorElementPingAttribute); |
SpaceSplitString ping_urls(ping_value, SpaceSplitString::kShouldNotFoldCase); |