Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index a535573a04cb930f955c0a3b3e8a4b2c51316098..dd8fbb6e39be4ed668ddf038f34f257861cd9ee1 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -3318,13 +3318,10 @@ bool Element::supportsStyleSharing() const |
// Ids stop style sharing if they show up in the stylesheets. |
if (hasID() && document().ensureStyleResolver().hasRulesForId(idForStyleResolution())) |
return false; |
- // Active and hovered elements always make a chain towards the document node |
- // and no siblings or cousins will have the same state. |
- if (hovered()) |
- return false; |
- if (active()) |
- return false; |
- if (focused()) |
+ // :active and :hover elements always make a chain towards the document node |
+ // and no siblings or cousins will have the same state. There's also only one |
+ // :focus element per scope so we don't need to attempt to share. |
+ if (isUserActionElement()) |
return false; |
if (!parentOrShadowHostElement()->childrenSupportStyleSharing()) |
return false; |