Bug 778654 - Make SVG <a> elements focusable by default; r?heycam draft
authorDaosheng Mu <daoshengmu@gmail.com>
Tue, 24 May 2016 12:24:45 +0800
changeset 370110 60adb747522a2aa8c5db6782c530a8a673316873
parent 370109 1cb72e2249fb6f2e141461d48093a26c7a712470
child 370111 d29a1aa576e4e594a6d8bb9559422b3c0d1d50e5
push id18990
push userbmo:dmu@mozilla.com
push dateTue, 24 May 2016 06:34:08 +0000
reviewersheycam
bugs778654
milestone49.0a1
Bug 778654 - Make SVG <a> elements focusable by default; r?heycam MozReview-Commit-ID: 660YSIhSI0s
dom/svg/SVGAElement.cpp
--- a/dom/svg/SVGAElement.cpp
+++ b/dom/svg/SVGAElement.cpp
@@ -189,16 +189,19 @@ SVGAElement::IsFocusableInternal(int32_t
 {
   nsCOMPtr<nsIURI> uri;
   if (IsLink(getter_AddRefs(uri))) {
     if (aTabIndex) {
       *aTabIndex = ((sTabFocusModel & eTabFocus_linksMask) == 0 ? -1 : 0);
     }
     return true;
   }
+  if (nsSVGElement::IsFocusableInternal(aTabIndex, aWithMouse)) {
+    return true;
+  }
 
   if (aTabIndex) {
     *aTabIndex = -1;
   }
 
   return false;
 }