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

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

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove initialization of the view 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (hasRel(RelationNoOpener)) 363 if (hasRel(RelationNoOpener))
364 frameRequest.setShouldSetOpener(NeverSetOpener); 364 frameRequest.setShouldSetOpener(NeverSetOpener);
365 // TODO(japhet): Link clicks can be emulated via JS without a user gestu re. 365 // TODO(japhet): Link clicks can be emulated via JS without a user gestu re.
366 // Why doesn't this go through NavigationScheduler? 366 // Why doesn't this go through NavigationScheduler?
367 frame->loader().load(frameRequest); 367 frame->loader().load(frameRequest);
368 } 368 }
369 } 369 }
370 370
371 bool isEnterKeyKeydownEvent(Event* event) 371 bool isEnterKeyKeydownEvent(Event* event)
372 { 372 {
373 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent() && toKeyboardEvent(event)->keyIdentifier() == "Enter" && !toKeyboardEvent(event) ->repeat(); 373 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent() && toKeyboardEvent(event)->key() == "Enter" && !toKeyboardEvent(event)->repeat() ;
374 } 374 }
375 375
376 bool isLinkClick(Event* event) 376 bool isLinkClick(Event* event)
377 { 377 {
378 // Allow detail <= 1 so that synthetic clicks work. They may have detail == 0. 378 // Allow detail <= 1 so that synthetic clicks work. They may have detail == 0.
379 return event->type() == EventTypeNames::click && (!event->isMouseEvent() || (toMouseEvent(event)->button() != RightButton && toMouseEvent(event)->detail() < = 1)); 379 return event->type() == EventTypeNames::click && (!event->isMouseEvent() || (toMouseEvent(event)->button() != RightButton && toMouseEvent(event)->detail() < = 1));
380 } 380 }
381 381
382 bool HTMLAnchorElement::willRespondToMouseClickEvents() 382 bool HTMLAnchorElement::willRespondToMouseClickEvents()
383 { 383 {
384 return isLink() || HTMLElement::willRespondToMouseClickEvents(); 384 return isLink() || HTMLElement::willRespondToMouseClickEvents();
385 } 385 }
386 386
387 bool HTMLAnchorElement::isInteractiveContent() const 387 bool HTMLAnchorElement::isInteractiveContent() const
388 { 388 {
389 return isLink(); 389 return isLink();
390 } 390 }
391 391
392 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint) 392 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint)
393 { 393 {
394 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int); 394 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int);
395 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); 395 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr);
396 return request; 396 return request;
397 } 397 }
398 398
399 } // namespace blink 399 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698