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

Unified Diff: Source/core/dom/Node.cpp

Issue 455223002: Make anchors mouse-focusable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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 | « Source/core/dom/Node.h ('k') | Source/core/events/EventDispatcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 86b776ca6635bcd78088e9361e474924b4363aff..002b1f1e9bd760ceb93159253260d0de4dae199f 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -81,6 +81,7 @@
#include "core/html/HTMLStyleElement.h"
#include "core/page/ContextMenuController.h"
#include "core/page/EventHandler.h"
+#include "core/page/FocusController.h"
#include "core/page/Page.h"
#include "core/frame/Settings.h"
#include "core/rendering/FlowThreadController.h"
@@ -2181,6 +2182,12 @@ void Node::defaultEventHandler(Event* event)
const AtomicString& eventType = event->type();
if (eventType == EventTypeNames::keydown || eventType == EventTypeNames::keypress) {
if (event->isKeyboardEvent()) {
+ if (eventType == EventTypeNames::keydown) {
+ if (Page* page = document().page()) {
+ if (page->focusController().setWasFocusedByMouse(false) && renderer())
+ renderer()->setShouldDoFullPaintInvalidation(true);
+ }
+ }
robwu 2014/08/19 17:03:56 These lines are bugging me a little bit. Previousl
if (LocalFrame* frame = document().frame())
frame->eventHandler().defaultKeyboardEventHandler(toKeyboardEvent(event));
}
@@ -2237,10 +2244,6 @@ void Node::defaultEventHandler(Event* event)
}
}
-void Node::willCallDefaultEventHandler(const Event&)
-{
-}
-
bool Node::willRespondToMouseMoveEvents()
{
if (isDisabledFormControl(this))
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/events/EventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698