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

Unified Diff: Source/core/dom/Element.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/dom/Element.h ('k') | Source/core/html/HTMLAnchorElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 1f2fed69eefcbaeb8f6dd79a86194da9d66c3598..d88a7555ca1422d69272b0260535a70bdecd0986 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -2135,22 +2135,8 @@ bool Element::isMouseFocusable() const
return isFocusable();
}
-void Element::willCallDefaultEventHandler(const Event& event)
-{
- if (!wasFocusedByMouse())
- return;
- if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown)
- return;
- setWasFocusedByMouse(false);
- if (renderer())
- renderer()->setShouldDoFullPaintInvalidation(true);
-}
-
void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusType type)
{
- if (type != FocusTypePage)
- setWasFocusedByMouse(type == FocusTypeMouse);
-
RefPtrWillBeRawPtr<FocusEvent> event = FocusEvent::create(EventTypeNames::focus, false, false, document().domWindow(), 0, oldFocusedElement);
EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(event.release()));
}
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/html/HTMLAnchorElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698