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

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: from scratch: put focus logic in Element 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..9aa9b28d4fbc33d6a0ecebf9f6630af789f29fe2 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -371,10 +371,13 @@ public:
// rendererIsFocusable(), this method may be called when layout is not up to
// date, so it must not use the renderer to determine focusability.
virtual bool supportsFocus() const;
+ virtual bool shouldShowFocusRingOnMouseFocus() const { return true; };
+ virtual bool shouldHaveFocusAppearance() const OVERRIDE FINAL;
// Whether the node can actually be focused.
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);
@@ -637,6 +640,8 @@ private:
bool isJavaScriptURLAttribute(const Attribute&) const;
+ bool m_wasFocusedByMouse;
pdr. 2014/08/25 17:46:18 Should this be put in m_elementData instead?
robwu 2014/08/25 22:40:03 Probably yes. I found it a bit odd that there were
+
RefPtrWillBeMember<ElementData> m_elementData;
};
« 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