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 reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 setHref(AtomicString(url.string())); | 339 setHref(AtomicString(url.string())); |
340 } | 340 } |
341 | 341 |
342 String HTMLAnchorElement::input() const | 342 String HTMLAnchorElement::input() const |
343 { | 343 { |
344 return getAttribute(hrefAttr); | 344 return getAttribute(hrefAttr); |
345 } | 345 } |
346 | 346 |
347 void HTMLAnchorElement::setInput(const String& value) | 347 void HTMLAnchorElement::setInput(const String& value) |
348 { | 348 { |
349 setHref(value); | 349 setHref(AtomicString(value)); |
350 } | 350 } |
351 | 351 |
352 bool HTMLAnchorElement::hasRel(uint32_t relation) const | 352 bool HTMLAnchorElement::hasRel(uint32_t relation) const |
353 { | 353 { |
354 return m_linkRelations & relation; | 354 return m_linkRelations & relation; |
355 } | 355 } |
356 | 356 |
357 void HTMLAnchorElement::setRel(const String& value) | 357 void HTMLAnchorElement::setRel(const AtomicString& value) |
358 { | 358 { |
359 m_linkRelations = 0; | 359 m_linkRelations = 0; |
360 SpaceSplitString newLinkRelations(value, true); | 360 SpaceSplitString newLinkRelations(value, true); |
361 // FIXME: Add link relations as they are implemented | 361 // FIXME: Add link relations as they are implemented |
362 if (newLinkRelations.contains("noreferrer")) | 362 if (newLinkRelations.contains("noreferrer")) |
363 m_linkRelations |= RelationNoReferrer; | 363 m_linkRelations |= RelationNoReferrer; |
364 } | 364 } |
365 | 365 |
366 const AtomicString& HTMLAnchorElement::name() const | 366 const AtomicString& HTMLAnchorElement::name() const |
367 { | 367 { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // sent out. | 417 // sent out. |
418 sendPings(completedURL); | 418 sendPings(completedURL); |
419 | 419 |
420 ResourceRequest request(completedURL); | 420 ResourceRequest request(completedURL); |
421 if (prefetchEventHandler()->hasIssuedPreconnect()) | 421 if (prefetchEventHandler()->hasIssuedPreconnect()) |
422 frame->loader().client()->dispatchWillRequestAfterPreconnect(request); | 422 frame->loader().client()->dispatchWillRequestAfterPreconnect(request); |
423 if (hasAttribute(downloadAttr)) { | 423 if (hasAttribute(downloadAttr)) { |
424 if (!hasRel(RelationNoReferrer)) { | 424 if (!hasRel(RelationNoReferrer)) { |
425 String referrer = SecurityPolicy::generateReferrerHeader(document().
referrerPolicy(), completedURL, document().outgoingReferrer()); | 425 String referrer = SecurityPolicy::generateReferrerHeader(document().
referrerPolicy(), completedURL, document().outgoingReferrer()); |
426 if (!referrer.isEmpty()) | 426 if (!referrer.isEmpty()) |
427 request.setHTTPReferrer(referrer); | 427 request.setHTTPReferrer(AtomicString(referrer)); |
428 } | 428 } |
429 | 429 |
430 frame->loader().client()->loadURLExternally(request, NavigationPolicyDow
nload, fastGetAttribute(downloadAttr)); | 430 frame->loader().client()->loadURLExternally(request, NavigationPolicyDow
nload, fastGetAttribute(downloadAttr)); |
431 } else { | 431 } else { |
432 FrameLoadRequest frameRequest(&document(), request, target()); | 432 FrameLoadRequest frameRequest(&document(), request, target()); |
433 frameRequest.setTriggeringEvent(event); | 433 frameRequest.setTriggeringEvent(event); |
434 if (hasRel(RelationNoReferrer)) | 434 if (hasRel(RelationNoReferrer)) |
435 frameRequest.setShouldSendReferrer(NeverSendReferrer); | 435 frameRequest.setShouldSendReferrer(NeverSendReferrer); |
436 frame->loader().load(frameRequest); | 436 frame->loader().load(frameRequest); |
437 } | 437 } |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 preconnectToURL(url, motivation); | 689 preconnectToURL(url, motivation); |
690 m_hasIssuedPreconnect = true; | 690 m_hasIssuedPreconnect = true; |
691 } | 691 } |
692 | 692 |
693 bool HTMLAnchorElement::isInteractiveContent() const | 693 bool HTMLAnchorElement::isInteractiveContent() const |
694 { | 694 { |
695 return true; | 695 return true; |
696 } | 696 } |
697 | 697 |
698 } | 698 } |
OLD | NEW |