| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "core/frame/LocalFrameClient.h" | 30 #include "core/frame/LocalFrameClient.h" |
| 31 #include "core/frame/Settings.h" | 31 #include "core/frame/Settings.h" |
| 32 #include "core/frame/UseCounter.h" | 32 #include "core/frame/UseCounter.h" |
| 33 #include "core/html/HTMLImageElement.h" | 33 #include "core/html/HTMLImageElement.h" |
| 34 #include "core/html/parser/HTMLParserIdioms.h" | 34 #include "core/html/parser/HTMLParserIdioms.h" |
| 35 #include "core/layout/LayoutBox.h" | 35 #include "core/layout/LayoutBox.h" |
| 36 #include "core/loader/FrameLoadRequest.h" | 36 #include "core/loader/FrameLoadRequest.h" |
| 37 #include "core/loader/PingLoader.h" | 37 #include "core/loader/PingLoader.h" |
| 38 #include "core/page/ChromeClient.h" | 38 #include "core/page/ChromeClient.h" |
| 39 #include "core/page/Page.h" | 39 #include "core/page/Page.h" |
| 40 #include "platform/loader/fetch/ResourceFetcher.h" |
| 40 #include "platform/network/NetworkHints.h" | 41 #include "platform/network/NetworkHints.h" |
| 41 #include "platform/weborigin/SecurityPolicy.h" | 42 #include "platform/weborigin/SecurityPolicy.h" |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 | 45 |
| 45 using namespace HTMLNames; | 46 using namespace HTMLNames; |
| 46 | 47 |
| 47 HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tag_name, | 48 HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tag_name, |
| 48 Document& document) | 49 Document& document) |
| 49 : HTMLElement(tag_name, document), | 50 : HTMLElement(tag_name, document), |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 bool HTMLAnchorElement::IsLiveLink() const { | 299 bool HTMLAnchorElement::IsLiveLink() const { |
| 299 return IsLink() && !HasEditableStyle(*this); | 300 return IsLink() && !HasEditableStyle(*this); |
| 300 } | 301 } |
| 301 | 302 |
| 302 void HTMLAnchorElement::SendPings(const KURL& destination_url) const { | 303 void HTMLAnchorElement::SendPings(const KURL& destination_url) const { |
| 303 const AtomicString& ping_value = getAttribute(pingAttr); | 304 const AtomicString& ping_value = getAttribute(pingAttr); |
| 304 if (ping_value.IsNull() || !GetDocument().GetSettings() || | 305 if (ping_value.IsNull() || !GetDocument().GetSettings() || |
| 305 !GetDocument().GetSettings()->GetHyperlinkAuditingEnabled()) | 306 !GetDocument().GetSettings()->GetHyperlinkAuditingEnabled()) |
| 306 return; | 307 return; |
| 307 | 308 |
| 309 // Pings should not be sent if MHTML page is loaded. |
| 310 if (GetDocument().Fetcher()->Archive()) |
| 311 return; |
| 312 |
| 308 UseCounter::Count(GetDocument(), UseCounter::kHTMLAnchorElementPingAttribute); | 313 UseCounter::Count(GetDocument(), UseCounter::kHTMLAnchorElementPingAttribute); |
| 309 | 314 |
| 310 SpaceSplitString ping_urls(ping_value, SpaceSplitString::kShouldNotFoldCase); | 315 SpaceSplitString ping_urls(ping_value, SpaceSplitString::kShouldNotFoldCase); |
| 311 for (unsigned i = 0; i < ping_urls.size(); i++) | 316 for (unsigned i = 0; i < ping_urls.size(); i++) |
| 312 PingLoader::SendLinkAuditPing(GetDocument().GetFrame(), | 317 PingLoader::SendLinkAuditPing(GetDocument().GetFrame(), |
| 313 GetDocument().CompleteURL(ping_urls[i]), | 318 GetDocument().CompleteURL(ping_urls[i]), |
| 314 destination_url); | 319 destination_url); |
| 315 } | 320 } |
| 316 | 321 |
| 317 void HTMLAnchorElement::HandleClick(Event* event) { | 322 void HTMLAnchorElement::HandleClick(Event* event) { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 411 |
| 407 Node::InsertionNotificationRequest HTMLAnchorElement::InsertedInto( | 412 Node::InsertionNotificationRequest HTMLAnchorElement::InsertedInto( |
| 408 ContainerNode* insertion_point) { | 413 ContainerNode* insertion_point) { |
| 409 InsertionNotificationRequest request = | 414 InsertionNotificationRequest request = |
| 410 HTMLElement::InsertedInto(insertion_point); | 415 HTMLElement::InsertedInto(insertion_point); |
| 411 LogAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); | 416 LogAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); |
| 412 return request; | 417 return request; |
| 413 } | 418 } |
| 414 | 419 |
| 415 } // namespace blink | 420 } // namespace blink |
| OLD | NEW |