Chromium Code Reviews| 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) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 bool willRespondToMouseClickEvents() final; | 80 bool willRespondToMouseClickEvents() final; |
| 81 | 81 |
| 82 bool hasRel(uint32_t relation) const; | 82 bool hasRel(uint32_t relation) const; |
| 83 void setRel(const AtomicString&); | 83 void setRel(const AtomicString&); |
| 84 | 84 |
| 85 LinkHash visitedLinkHash() const; | 85 LinkHash visitedLinkHash() const; |
| 86 void invalidateCachedVisitedLinkHash() { m_cachedVisitedLinkHash = 0; } | 86 void invalidateCachedVisitedLinkHash() { m_cachedVisitedLinkHash = 0; } |
| 87 | 87 |
| 88 void sendPings(const KURL& destinationURL) const; | 88 void sendPings(const KURL& destinationURL) const; |
| 89 | 89 |
| 90 DECLARE_VIRTUAL_TRACE(); | |
| 91 | |
| 90 protected: | 92 protected: |
| 91 HTMLAnchorElement(const QualifiedName&, Document&); | 93 HTMLAnchorElement(const QualifiedName&, Document&); |
| 92 | 94 |
| 93 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; | 95 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; |
| 94 bool supportsFocus() const override; | 96 bool supportsFocus() const override; |
| 95 bool matchesEnabledPseudoClass() const override; | 97 bool matchesEnabledPseudoClass() const override; |
| 96 | 98 |
| 97 private: | 99 private: |
| 100 class NavigationHintSender; | |
| 101 | |
| 98 bool shouldHaveFocusAppearance() const final; | 102 bool shouldHaveFocusAppearance() const final; |
| 99 void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType, InputDevic eCapabilities* sourceCapabilities) override; | 103 void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType, InputDevic eCapabilities* sourceCapabilities) override; |
| 100 void dispatchBlurEvent(Element* newFocusedElement, WebFocusType, InputDevice Capabilities* sourceCapabilities) override; | 104 void dispatchBlurEvent(Element* newFocusedElement, WebFocusType, InputDevice Capabilities* sourceCapabilities) override; |
| 101 bool isMouseFocusable() const override; | 105 bool isMouseFocusable() const override; |
| 102 bool isKeyboardFocusable() const override; | 106 bool isKeyboardFocusable() const override; |
| 103 void defaultEventHandler(Event*) final; | 107 void defaultEventHandler(Event*) final; |
| 104 void setActive(bool = true) final; | 108 void setActive(bool = true) final; |
| 105 void accessKeyAction(bool sendMouseEvents) final; | 109 void accessKeyAction(bool sendMouseEvents) final; |
| 106 bool isURLAttribute(const Attribute&) const final; | 110 bool isURLAttribute(const Attribute&) const final; |
| 107 bool hasLegalLinkAttribute(const QualifiedName&) const final; | 111 bool hasLegalLinkAttribute(const QualifiedName&) const final; |
| 108 bool canStartSelection() const final; | 112 bool canStartSelection() const final; |
| 109 short tabIndex() const final; | 113 short tabIndex() const final; |
| 110 bool draggable() const final; | 114 bool draggable() const final; |
| 111 bool isInteractiveContent() const final; | 115 bool isInteractiveContent() const final; |
| 112 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 116 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 113 void handleClick(Event*); | 117 void handleClick(Event*); |
| 118 NavigationHintSender* ensureNavigationHintSender(); | |
| 114 | 119 |
| 115 uint32_t m_linkRelations; | 120 uint32_t m_linkRelations; |
| 116 mutable LinkHash m_cachedVisitedLinkHash; | 121 mutable LinkHash m_cachedVisitedLinkHash; |
| 117 bool m_wasFocusedByMouse; | 122 bool m_wasFocusedByMouse; |
| 123 Member<NavigationHintSender> m_navigationHintsender; | |
|
falken
2016/06/15 13:48:19
s/sender/Sender
horo
2016/06/16 06:02:44
Done.
| |
| 118 }; | 124 }; |
| 119 | 125 |
| 120 inline LinkHash HTMLAnchorElement::visitedLinkHash() const | 126 inline LinkHash HTMLAnchorElement::visitedLinkHash() const |
| 121 { | 127 { |
| 122 if (!m_cachedVisitedLinkHash) | 128 if (!m_cachedVisitedLinkHash) |
| 123 m_cachedVisitedLinkHash = blink::visitedLinkHash(document().baseURL(), f astGetAttribute(HTMLNames::hrefAttr)); | 129 m_cachedVisitedLinkHash = blink::visitedLinkHash(document().baseURL(), f astGetAttribute(HTMLNames::hrefAttr)); |
| 124 return m_cachedVisitedLinkHash; | 130 return m_cachedVisitedLinkHash; |
| 125 } | 131 } |
| 126 | 132 |
| 127 // Functions shared with the other anchor elements (i.e., SVG). | 133 // Functions shared with the other anchor elements (i.e., SVG). |
| 128 | 134 |
| 129 bool isEnterKeyKeydownEvent(Event*); | 135 bool isEnterKeyKeydownEvent(Event*); |
| 130 bool isLinkClick(Event*); | 136 bool isLinkClick(Event*); |
| 131 | 137 |
| 132 } // namespace blink | 138 } // namespace blink |
| 133 | 139 |
| 134 #endif // HTMLAnchorElement_h | 140 #endif // HTMLAnchorElement_h |
| OLD | NEW |