| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE FINA
L; | 100 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE FINA
L; |
| 101 virtual bool canStartSelection() const OVERRIDE FINAL; | 101 virtual bool canStartSelection() const OVERRIDE FINAL; |
| 102 virtual short tabIndex() const OVERRIDE FINAL; | 102 virtual short tabIndex() const OVERRIDE FINAL; |
| 103 virtual bool draggable() const OVERRIDE FINAL; | 103 virtual bool draggable() const OVERRIDE FINAL; |
| 104 virtual bool isInteractiveContent() const OVERRIDE FINAL; | 104 virtual bool isInteractiveContent() const OVERRIDE FINAL; |
| 105 | 105 |
| 106 void sendPings(const KURL& destinationURL); | 106 void sendPings(const KURL& destinationURL); |
| 107 AtomicString target() const; | 107 AtomicString target() const; |
| 108 void handleClick(Event*); | 108 void handleClick(Event*); |
| 109 | 109 |
| 110 enum EventType { | |
| 111 MouseEventWithoutShiftKey, | |
| 112 MouseEventWithShiftKey, | |
| 113 NonMouseEvent, | |
| 114 }; | |
| 115 static EventType eventType(Event*); | |
| 116 bool treatLinkAsLiveForEventType(EventType) const; | |
| 117 | |
| 118 Element* rootEditableElementForSelectionOnMouseDown() const; | |
| 119 void setRootEditableElementForSelectionOnMouseDown(Element*); | |
| 120 void clearRootEditableElementForSelectionOnMouseDown(); | |
| 121 | |
| 122 class PrefetchEventHandler; | 110 class PrefetchEventHandler; |
| 123 PrefetchEventHandler* prefetchEventHandler(); | 111 PrefetchEventHandler* prefetchEventHandler(); |
| 124 | 112 |
| 125 bool m_hasRootEditableElementForSelectionOnMouseDown : 1; | 113 uint32_t m_linkRelations; |
| 126 bool m_wasShiftKeyDownOnMouseDown : 1; | |
| 127 uint32_t m_linkRelations : 30; | |
| 128 OwnPtr<PrefetchEventHandler> m_prefetchEventHandler; | 114 OwnPtr<PrefetchEventHandler> m_prefetchEventHandler; |
| 129 mutable LinkHash m_cachedVisitedLinkHash; | 115 mutable LinkHash m_cachedVisitedLinkHash; |
| 130 }; | 116 }; |
| 131 | 117 |
| 132 inline LinkHash HTMLAnchorElement::visitedLinkHash() const | 118 inline LinkHash HTMLAnchorElement::visitedLinkHash() const |
| 133 { | 119 { |
| 134 if (!m_cachedVisitedLinkHash) | 120 if (!m_cachedVisitedLinkHash) |
| 135 m_cachedVisitedLinkHash = WebCore::visitedLinkHash(document().baseURL(),
fastGetAttribute(HTMLNames::hrefAttr)); | 121 m_cachedVisitedLinkHash = WebCore::visitedLinkHash(document().baseURL(),
fastGetAttribute(HTMLNames::hrefAttr)); |
| 136 return m_cachedVisitedLinkHash; | 122 return m_cachedVisitedLinkHash; |
| 137 } | 123 } |
| 138 | 124 |
| 139 // Functions shared with the other anchor elements (i.e., SVG). | 125 // Functions shared with the other anchor elements (i.e., SVG). |
| 140 | 126 |
| 141 bool isEnterKeyKeydownEvent(Event*); | 127 bool isEnterKeyKeydownEvent(Event*); |
| 142 bool isLinkClick(Event*); | 128 bool isLinkClick(Event*); |
| 143 | 129 |
| 144 } // namespace WebCore | 130 } // namespace WebCore |
| 145 | 131 |
| 146 #endif // HTMLAnchorElement_h | 132 #endif // HTMLAnchorElement_h |
| OLD | NEW |