| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 } | 448 } |
| 449 | 449 |
| 450 bool isEnterKeyKeydownEvent(Event* event) | 450 bool isEnterKeyKeydownEvent(Event* event) |
| 451 { | 451 { |
| 452 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent()
&& toKeyboardEvent(event)->key() == "Enter" && !toKeyboardEvent(event)->repeat()
; | 452 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent()
&& toKeyboardEvent(event)->key() == "Enter" && !toKeyboardEvent(event)->repeat()
; |
| 453 } | 453 } |
| 454 | 454 |
| 455 bool isLinkClick(Event* event) | 455 bool isLinkClick(Event* event) |
| 456 { | 456 { |
| 457 // Allow detail <= 1 so that synthetic clicks work. They may have detail ==
0. | 457 // Allow detail <= 1 so that synthetic clicks work. They may have detail ==
0. |
| 458 return event->type() == EventTypeNames::click && (!event->isMouseEvent() ||
(toMouseEvent(event)->button() != RightButton && toMouseEvent(event)->detail() <
= 1)); | 458 return (event->type() == EventTypeNames::click || event->type() == EventType
Names::auxclick) && (!event->isMouseEvent() || (toMouseEvent(event)->button() !=
RightButton && toMouseEvent(event)->detail() <= 1)); |
| 459 } | 459 } |
| 460 | 460 |
| 461 bool HTMLAnchorElement::willRespondToMouseClickEvents() | 461 bool HTMLAnchorElement::willRespondToMouseClickEvents() |
| 462 { | 462 { |
| 463 return isLink() || HTMLElement::willRespondToMouseClickEvents(); | 463 return isLink() || HTMLElement::willRespondToMouseClickEvents(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 bool HTMLAnchorElement::isInteractiveContent() const | 466 bool HTMLAnchorElement::isInteractiveContent() const |
| 467 { | 467 { |
| 468 return isLink(); | 468 return isLink(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode
* insertionPoint) | 471 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode
* insertionPoint) |
| 472 { | 472 { |
| 473 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo
int); | 473 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo
int); |
| 474 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); | 474 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); |
| 475 return request; | 475 return request; |
| 476 } | 476 } |
| 477 | 477 |
| 478 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint
Sender() | 478 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint
Sender() |
| 479 { | 479 { |
| 480 if (!m_navigationHintSender) | 480 if (!m_navigationHintSender) |
| 481 m_navigationHintSender = NavigationHintSender::create(this); | 481 m_navigationHintSender = NavigationHintSender::create(this); |
| 482 return m_navigationHintSender; | 482 return m_navigationHintSender; |
| 483 } | 483 } |
| 484 | 484 |
| 485 } // namespace blink | 485 } // namespace blink |
| OLD | NEW |