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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 int x = absolutePosition.x(); | 140 int x = absolutePosition.x(); |
141 int y = absolutePosition.y(); | 141 int y = absolutePosition.y(); |
142 url.append('?'); | 142 url.append('?'); |
143 url.appendNumber(x); | 143 url.appendNumber(x); |
144 url.append(','); | 144 url.append(','); |
145 url.appendNumber(y); | 145 url.appendNumber(y); |
146 } | 146 } |
147 | 147 |
148 void HTMLAnchorElement::defaultEventHandler(Event* event) | 148 void HTMLAnchorElement::defaultEventHandler(Event* event) |
149 { | 149 { |
150 if (isLink()) { | 150 if (isLiveLink()) { |
151 if (focused() && isEnterKeyKeydownEvent(event) && isLiveLink()) { | 151 Node* target = event->target()->toNode(); |
152 if ((focused() || (target->focused() && contains(target))) && isEnterKey KeydownEvent(event)) { | |
pdr.
2014/10/01 20:32:37
This does not seem correct.
1) This will break ex
robwu
2014/10/01 21:25:54
Keyboard input events bubble, so I would expect th
| |
152 event->setDefaultHandled(); | 153 event->setDefaultHandled(); |
153 dispatchSimulatedClick(event); | 154 dispatchSimulatedClick(event); |
154 return; | 155 return; |
155 } | 156 } |
156 | 157 |
157 if (isLinkClick(event) && isLiveLink()) { | 158 if (isLinkClick(event)) { |
158 handleClick(event); | 159 handleClick(event); |
159 return; | 160 return; |
160 } | 161 } |
161 } | 162 } |
162 | 163 |
163 HTMLElement::defaultEventHandler(event); | 164 HTMLElement::defaultEventHandler(event); |
164 } | 165 } |
165 | 166 |
166 void HTMLAnchorElement::setActive(bool down) | 167 void HTMLAnchorElement::setActive(bool down) |
167 { | 168 { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 Vector<String> argv; | 392 Vector<String> argv; |
392 argv.append("a"); | 393 argv.append("a"); |
393 argv.append(fastGetAttribute(hrefAttr)); | 394 argv.append(fastGetAttribute(hrefAttr)); |
394 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); | 395 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); |
395 } | 396 } |
396 } | 397 } |
397 return HTMLElement::insertedInto(insertionPoint); | 398 return HTMLElement::insertedInto(insertionPoint); |
398 } | 399 } |
399 | 400 |
400 } | 401 } |
OLD | NEW |