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

Unified Diff: third_party/WebKit/Source/core/page/FocusController.cpp

Issue 2821303005: [selectors4] Use common ancestor strategy for :focus-within (Closed)
Patch Set: Use EXPECT_EQ instead of ASSERT_EQ Created 3 years, 8 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 | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FocusController.cpp
diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
index dcf0fbf94dfce46b854462bbdbbd8a16d6e0b1ff..8a535acb84055b56fb776688383a7d8cbb734b38 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -372,6 +372,7 @@ inline void DispatchEventsOnWindowAndFocusedElement(Document* document,
Element* focused_element = document->FocusedElement();
// Use focus_type kWebFocusTypePage, same as used in DispatchBlurEvent.
focused_element->SetFocused(false, kWebFocusTypePage);
+ focused_element->SetHasFocusWithinUpToAncestor(false, nullptr);
DispatchBlurEvent(*document, *focused_element);
}
@@ -382,6 +383,7 @@ inline void DispatchEventsOnWindowAndFocusedElement(Document* document,
Element* focused_element(document->FocusedElement());
// Use focus_type kWebFocusTypePage, same as used in DispatchFocusEvent.
focused_element->SetFocused(true, kWebFocusTypePage);
+ focused_element->SetHasFocusWithinUpToAncestor(true, nullptr);
DispatchFocusEvent(*document, *focused_element);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698