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

Unified Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 562653002: Do not reset mouse focus flag on keydown at anchor elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add regression test (click-focus-keydown-no-ring) Created 6 years, 3 months 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.h ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLAnchorElement.cpp
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
index 6875aa21e3e788d6874f404479faafa5f81a98ee..789bc483e77c920c60c7daca44b4cd2c3ee921a5 100644
--- a/Source/core/html/HTMLAnchorElement.cpp
+++ b/Source/core/html/HTMLAnchorElement.cpp
@@ -89,14 +89,11 @@ bool HTMLAnchorElement::shouldHaveFocusAppearance() const
return !m_wasFocusedByMouse || HTMLElement::supportsFocus();
}
-bool HTMLAnchorElement::wasFocusedByMouse() const
+void HTMLAnchorElement::dispatchFocusEvent(Element* oldFocusedElement, FocusType type)
{
- return m_wasFocusedByMouse;
-}
-
-void HTMLAnchorElement::setWasFocusedByMouse(bool wasFocusedByMouse)
-{
- m_wasFocusedByMouse = wasFocusedByMouse;
+ if (type != FocusTypePage)
+ m_wasFocusedByMouse = type == FocusTypeMouse;
+ HTMLElement::dispatchFocusEvent(oldFocusedElement, type);
}
bool HTMLAnchorElement::isMouseFocusable() const
« no previous file with comments | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698