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

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

Issue 2021373003: Disable frame navigations during DocumentLoader detach in FrameLoader::startLoad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 6 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
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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } else { 350 } else {
351 request.setRequestContext(WebURLRequest::RequestContextHyperlink); 351 request.setRequestContext(WebURLRequest::RequestContextHyperlink);
352 FrameLoadRequest frameRequest(&document(), request, getAttribute(targetA ttr)); 352 FrameLoadRequest frameRequest(&document(), request, getAttribute(targetA ttr));
353 frameRequest.setTriggeringEvent(event); 353 frameRequest.setTriggeringEvent(event);
354 if (hasRel(RelationNoReferrer)) { 354 if (hasRel(RelationNoReferrer)) {
355 frameRequest.setShouldSendReferrer(NeverSendReferrer); 355 frameRequest.setShouldSendReferrer(NeverSendReferrer);
356 frameRequest.setShouldSetOpener(NeverSetOpener); 356 frameRequest.setShouldSetOpener(NeverSetOpener);
357 } 357 }
358 if (hasRel(RelationNoOpener)) 358 if (hasRel(RelationNoOpener))
359 frameRequest.setShouldSetOpener(NeverSetOpener); 359 frameRequest.setShouldSetOpener(NeverSetOpener);
360 // TODO(japhet): Link clicks can be emulated via JS without a user gestu re.
361 // Why doesn't this go through NavigationScheduler?
360 frame->loader().load(frameRequest); 362 frame->loader().load(frameRequest);
361 } 363 }
362 } 364 }
363 365
364 bool isEnterKeyKeydownEvent(Event* event) 366 bool isEnterKeyKeydownEvent(Event* event)
365 { 367 {
366 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent() && toKeyboardEvent(event)->keyIdentifier() == "Enter"; 368 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent() && toKeyboardEvent(event)->keyIdentifier() == "Enter";
367 } 369 }
368 370
369 bool isLinkClick(Event* event) 371 bool isLinkClick(Event* event)
(...skipping 12 matching lines...) Expand all
382 } 384 }
383 385
384 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint) 386 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint)
385 { 387 {
386 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int); 388 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int);
387 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); 389 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr);
388 return request; 390 return request;
389 } 391 }
390 392
391 } // namespace blink 393 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698