Index: third_party/WebKit/Source/core/dom/ContainerNode.cpp |
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp |
index 3de58c2b8b065a3bc08c1e1f237b27374c12ecc8..1473d7c8d01bc6dffb15b32cb2714b340ea73385 100644 |
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp |
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp |
@@ -1069,13 +1069,6 @@ void ContainerNode::SetFocused(bool received, WebFocusType focus_type) { |
FocusStateChanged(); |
- UpdateDistribution(); |
- for (ContainerNode* node = this; node; |
- node = FlatTreeTraversal::Parent(*node)) { |
- node->SetHasFocusWithin(received); |
- node->FocusWithinStateChanged(); |
- } |
- |
if (GetLayoutObject() || received) |
return; |
@@ -1100,6 +1093,14 @@ void ContainerNode::SetFocused(bool received, WebFocusType focus_type) { |
} |
} |
+void ContainerNode::SetHasFocusWithinUpToAncestor(bool flag, Node* ancestor) { |
+ for (ContainerNode* node = this; node && node != ancestor; |
+ node = FlatTreeTraversal::Parent(*node)) { |
+ node->SetHasFocusWithin(flag); |
+ node->FocusWithinStateChanged(); |
+ } |
+} |
+ |
void ContainerNode::SetActive(bool down) { |
if (down == IsActive()) |
return; |