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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr))); | 426 url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr))); |
427 appendServerMapMousePosition(url, event); | 427 appendServerMapMousePosition(url, event); |
428 KURL completedURL = document().completeURL(url.toString()); | 428 KURL completedURL = document().completeURL(url.toString()); |
429 | 429 |
430 // Schedule the ping before the frame load. Prerender in Chrome may kill the
renderer as soon as the navigation is | 430 // Schedule the ping before the frame load. Prerender in Chrome may kill the
renderer as soon as the navigation is |
431 // sent out. | 431 // sent out. |
432 sendPings(completedURL); | 432 sendPings(completedURL); |
433 | 433 |
434 ResourceRequest request(completedURL); | 434 ResourceRequest request(completedURL); |
435 if (prefetchEventHandler()->hasIssuedPreconnect()) | 435 if (prefetchEventHandler()->hasIssuedPreconnect()) |
436 frame->loader()->client()->dispatchWillRequestAfterPreconnect(request); | 436 frame->loader().client()->dispatchWillRequestAfterPreconnect(request); |
437 if (hasAttribute(downloadAttr)) { | 437 if (hasAttribute(downloadAttr)) { |
438 if (!hasRel(RelationNoReferrer)) { | 438 if (!hasRel(RelationNoReferrer)) { |
439 String referrer = SecurityPolicy::generateReferrerHeader(document().
referrerPolicy(), completedURL, frame->loader()->outgoingReferrer()); | 439 String referrer = SecurityPolicy::generateReferrerHeader(document().
referrerPolicy(), completedURL, frame->loader().outgoingReferrer()); |
440 if (!referrer.isEmpty()) | 440 if (!referrer.isEmpty()) |
441 request.setHTTPReferrer(referrer); | 441 request.setHTTPReferrer(referrer); |
442 } | 442 } |
443 | 443 |
444 frame->loader()->client()->loadURLExternally(request, NavigationPolicyDo
wnload, fastGetAttribute(downloadAttr)); | 444 frame->loader().client()->loadURLExternally(request, NavigationPolicyDow
nload, fastGetAttribute(downloadAttr)); |
445 } else { | 445 } else { |
446 FrameLoadRequest frameRequest(document().securityOrigin(), request, targ
et()); | 446 FrameLoadRequest frameRequest(document().securityOrigin(), request, targ
et()); |
447 frameRequest.setTriggeringEvent(event); | 447 frameRequest.setTriggeringEvent(event); |
448 if (hasRel(RelationNoReferrer)) | 448 if (hasRel(RelationNoReferrer)) |
449 frameRequest.setShouldSendReferrer(NeverSendReferrer); | 449 frameRequest.setShouldSendReferrer(NeverSendReferrer); |
450 frame->loader()->load(frameRequest); | 450 frame->loader().load(frameRequest); |
451 } | 451 } |
452 } | 452 } |
453 | 453 |
454 HTMLAnchorElement::EventType HTMLAnchorElement::eventType(Event* event) | 454 HTMLAnchorElement::EventType HTMLAnchorElement::eventType(Event* event) |
455 { | 455 { |
456 if (!event->isMouseEvent()) | 456 if (!event->isMouseEvent()) |
457 return NonMouseEvent; | 457 return NonMouseEvent; |
458 return toMouseEvent(event)->shiftKey() ? MouseEventWithShiftKey : MouseEvent
WithoutShiftKey; | 458 return toMouseEvent(event)->shiftKey() ? MouseEventWithShiftKey : MouseEvent
WithoutShiftKey; |
459 } | 459 } |
460 | 460 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 preconnectToURL(url, motivation); | 703 preconnectToURL(url, motivation); |
704 m_hasIssuedPreconnect = true; | 704 m_hasIssuedPreconnect = true; |
705 } | 705 } |
706 | 706 |
707 bool HTMLAnchorElement::isInteractiveContent() const | 707 bool HTMLAnchorElement::isInteractiveContent() const |
708 { | 708 { |
709 return true; | 709 return true; |
710 } | 710 } |
711 | 711 |
712 } | 712 } |
OLD | NEW |