Index: Source/core/page/SpatialNavigation.h |
diff --git a/Source/core/page/SpatialNavigation.h b/Source/core/page/SpatialNavigation.h |
index c4a5cfb46bce776ced83383ade66fd175b5e0d86..779354d954b534d0f60f4fe545a25a38ac7ab078 100644 |
--- a/Source/core/page/SpatialNavigation.h |
+++ b/Source/core/page/SpatialNavigation.h |
@@ -94,6 +94,16 @@ enum RectsAlignment { |
Full |
}; |
+// Classification of a focus candidate, ie. why a candidate is considered |
+// "interesting" as a navigation target. |
+enum NavigationClass { |
+ NavigationClassNone, |
+ NavigationClassFocusable, |
+ NavigationClassFrameOwner, |
+ NavigationClassScrollable, |
+ NavigationClassEventHandler, |
+}; |
+ |
struct FocusCandidate { |
STACK_ALLOCATED(); |
public: |
@@ -105,11 +115,11 @@ public: |
, alignment(None) |
, isOffscreen(true) |
, isOffscreenAfterScrolling(true) |
+ , targetClass(NavigationClassNone) |
{ |
} |
- FocusCandidate(Node*, FocusType); |
- explicit FocusCandidate(HTMLAreaElement*, FocusType); |
+ FocusCandidate(Node*, FocusType, NavigationClass); |
bool isNull() const { return !visibleNode; } |
bool inScrollableContainer() const { return visibleNode && enclosingScrollableBox; } |
bool isFrameOwnerElement() const { return visibleNode && visibleNode->isFrameOwnerElement(); } |
@@ -126,6 +136,7 @@ public: |
LayoutRect rect; |
bool isOffscreen; |
bool isOffscreenAfterScrolling; |
+ NavigationClass targetClass; |
}; |
bool hasOffscreenRect(Node*, FocusType = FocusTypeNone); |