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

Unified Diff: Source/core/svg/SVGAElement.cpp

Issue 619613005: The link should be activated by enter key on focusing the child element inside the anchor(relanding) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLAnchorElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAElement.cpp
diff --git a/Source/core/svg/SVGAElement.cpp b/Source/core/svg/SVGAElement.cpp
index 08e03a9af4571a4497575a3e6383dfafc8bf3e76..ff0586abb8e96972e7816b4d99aef12dae2f7b5b 100644
--- a/Source/core/svg/SVGAElement.cpp
+++ b/Source/core/svg/SVGAElement.cpp
@@ -110,7 +110,10 @@ RenderObject* SVGAElement::createRenderer(RenderStyle*)
void SVGAElement::defaultEventHandler(Event* event)
{
if (isLink()) {
- if (focused() && isEnterKeyKeydownEvent(event)) {
+ ASSERT(event->target());
+ Node* target = event->target()->toNode();
+ ASSERT(target);
+ if ((focused() || target->focused()) && isEnterKeyKeypressEvent(event)) {
event->setDefaultHandled();
dispatchSimulatedClick(event);
return;
« no previous file with comments | « Source/core/html/HTMLAnchorElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698