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

Side by Side Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/inspector/InspectorOverlay.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 StringBuilder url; 310 StringBuilder url;
311 url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr))); 311 url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr)));
312 appendServerMapMousePosition(url, event); 312 appendServerMapMousePosition(url, event);
313 KURL completedURL = document().completeURL(url.toString()); 313 KURL completedURL = document().completeURL(url.toString());
314 314
315 // Schedule the ping before the frame load. Prerender in Chrome may kill the renderer as soon as the navigation is 315 // Schedule the ping before the frame load. Prerender in Chrome may kill the renderer as soon as the navigation is
316 // sent out. 316 // sent out.
317 sendPings(completedURL); 317 sendPings(completedURL);
318 318
319 ResourceRequest request(completedURL); 319 ResourceRequest request = ResourceRequest(completedURL, frame->isMainFrame() );
320 if (hasAttribute(downloadAttr)) { 320 if (hasAttribute(downloadAttr)) {
321 if (!hasRel(RelationNoReferrer)) { 321 if (!hasRel(RelationNoReferrer)) {
322 String referrer = SecurityPolicy::generateReferrerHeader(document(). referrerPolicy(), completedURL, document().outgoingReferrer()); 322 String referrer = SecurityPolicy::generateReferrerHeader(document(). referrerPolicy(), completedURL, document().outgoingReferrer());
323 if (!referrer.isEmpty()) 323 if (!referrer.isEmpty())
324 request.setHTTPReferrer(Referrer(referrer, document().referrerPo licy())); 324 request.setHTTPReferrer(Referrer(referrer, document().referrerPo licy()));
325 } 325 }
326 326
327 bool isSameOrigin = completedURL.protocolIsData() || document().security Origin()->canRequest(completedURL); 327 bool isSameOrigin = completedURL.protocolIsData() || document().security Origin()->canRequest(completedURL);
328 const AtomicString& suggestedName = (isSameOrigin ? fastGetAttribute(dow nloadAttr) : nullAtom); 328 const AtomicString& suggestedName = (isSameOrigin ? fastGetAttribute(dow nloadAttr) : nullAtom);
329 329
(...skipping 21 matching lines...) Expand all
351 { 351 {
352 return isLink() || HTMLElement::willRespondToMouseClickEvents(); 352 return isLink() || HTMLElement::willRespondToMouseClickEvents();
353 } 353 }
354 354
355 bool HTMLAnchorElement::isInteractiveContent() const 355 bool HTMLAnchorElement::isInteractiveContent() const
356 { 356 {
357 return isLink(); 357 return isLink();
358 } 358 }
359 359
360 } 360 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698