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

Unified Diff: Source/core/dom/Element.h

Issue 455223002: Make anchors mouse-focusable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move m_wasFocusedByMouse into subclasses. Created 6 years, 4 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 | « LayoutTests/fast/events/resources/focus-anchor-by-mouse.js ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 8136281da8dc93da17bacc4be952a70105514f63..530c3abea4b1d0cd572573266ae7736743f01af7 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -375,6 +375,7 @@ public:
bool isFocusable() const;
virtual bool isKeyboardFocusable() const;
virtual bool isMouseFocusable() const;
+ virtual void willCallDefaultEventHandler(const Event&) OVERRIDE FINAL;
virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType);
virtual void dispatchBlurEvent(Element* newFocusedElement);
void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocusedElement);
@@ -530,6 +531,10 @@ protected:
// e.g., HTMLOptionElement.
virtual bool rendererIsFocusable() const;
+ // These methods are overridden by subclasses whose default focus appearance should not remain hidden on mouse focus.
+ virtual bool wasFocusedByMouse() const { return false; }
+ virtual void setWasFocusedByMouse(bool) { }
+
// classAttributeChanged() exists to share code between
// parseAttribute (called via setAttribute()) and
// svgAttributeChanged (called when element.className.baseValue is set)
« no previous file with comments | « LayoutTests/fast/events/resources/focus-anchor-by-mouse.js ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698