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

Unified Diff: third_party/WebKit/Source/core/dom/UserActionElementSet.h

Issue 2795143004: [selectors4] Implement :focus-within pseudo-class (Closed)
Patch Set: Rebased patch 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
Index: third_party/WebKit/Source/core/dom/UserActionElementSet.h
diff --git a/third_party/WebKit/Source/core/dom/UserActionElementSet.h b/third_party/WebKit/Source/core/dom/UserActionElementSet.h
index 9926d9e57701e8fc20dd16e3e91750fd32e8b42f..352fb8c9b82d0df72fb5262c7e41c778b4a53427 100644
--- a/third_party/WebKit/Source/core/dom/UserActionElementSet.h
+++ b/third_party/WebKit/Source/core/dom/UserActionElementSet.h
@@ -40,6 +40,9 @@ class UserActionElementSet final {
public:
bool IsFocused(const Node* node) { return HasFlags(node, kIsFocusedFlag); }
+ bool HasFocusWithin(const Node* node) {
+ return HasFlags(node, kHasFocusWithinFlag);
+ }
bool IsActive(const Node* node) { return HasFlags(node, kIsActiveFlag); }
bool IsInActiveChain(const Node* node) {
return HasFlags(node, kInActiveChainFlag);
@@ -49,6 +52,9 @@ class UserActionElementSet final {
void SetFocused(Node* node, bool enable) {
SetFlags(node, enable, kIsFocusedFlag);
}
+ void SetHasFocusWithin(Node* node, bool enable) {
+ SetFlags(node, enable, kHasFocusWithinFlag);
+ }
void SetActive(Node* node, bool enable) {
SetFlags(node, enable, kIsActiveFlag);
}
@@ -76,6 +82,7 @@ class UserActionElementSet final {
kIsHoveredFlag = 1 << 2,
kIsFocusedFlag = 1 << 3,
kIsDraggedFlag = 1 << 4,
+ kHasFocusWithinFlag = 1 << 5,
};
void SetFlags(Node* node, bool enable, unsigned flags) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleChangeReason.cpp ('k') | third_party/WebKit/Source/core/dom/UserActionElementSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698