| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index 45a91520ec31434010ac96e70b77e51e429b7f9c..e6d2621256e7b75dba22ece62f59c2685052dc6c 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -5610,8 +5610,8 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
|
| // (for instance by setting display:none in the :hover pseudo-class). In this case, the old hovered element (and its ancestors)
|
| // must be updated, to ensure it's normal style is re-applied.
|
| if (oldHoverNode && !oldHoverObj) {
|
| - for (Node* node = oldHoverNode; node; node = node->parentNode()) {
|
| - if (!mustBeInActiveChain || (node->isElementNode() && toElement(node)->inActiveChain()))
|
| + for (Node& node : NodeTraversal::inclusiveAncestorsOf(*oldHoverNode)) {
|
| + if (!mustBeInActiveChain || (node.isElementNode() && toElement(node).inActiveChain()))
|
| nodesToRemoveFromChain.append(node);
|
| }
|
|
|
|
|