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

Unified Diff: Source/core/dom/Document.cpp

Issue 317733004: Update an Element's ancestor chain at the end of its activation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated Testexpectations Created 6 years, 6 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index d3ff7e416ef064d37ab0cf9a617667826fd9bde1..ed0391764a5fd5cd65787f40c78e38cc331beebf 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -5455,6 +5455,14 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
m_userActionElements.setInActiveChain(curr->node(), false);
}
}
+ // The oldActiveElement renderer is null, dropped on :active by setting display: none,
+ // for instance. We still need to clear the ActiveChain as the mouse is released.
+ if (!oldActiveElement->renderer()) {
+ for (Node* node = oldActiveElement; node; node = node->parentNode()) {
+ node->setActive(false);
+ m_userActionElements.setInActiveChain(node, false);
+ }
+ }
setActiveHoverElement(nullptr);
} else {
Element* newActiveElement = innerElementInDocument;

Powered by Google App Engine
This is Rietveld 408576698