| Index: Source/core/css/resolver/StyleResolver.cpp
|
| diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
|
| index 2acff38b5d4ad1a74f5b34fa90699f2a38ebdfdc..d0839dac77ca28b5f1d27d3edd563f1d2040350b 100644
|
| --- a/Source/core/css/resolver/StyleResolver.cpp
|
| +++ b/Source/core/css/resolver/StyleResolver.cpp
|
| @@ -796,6 +796,15 @@ RenderStyle* StyleResolver::locateSharedStyle()
|
| // Ids stop style sharing if they show up in the stylesheets.
|
| if (state.styledElement()->hasID() && m_features.idsInRules.contains(state.styledElement()->idForStyleResolution().impl()))
|
| return 0;
|
| + // Active and hovered elements always make a chain towards the document node
|
| + // and no siblings or cousins will have the same state.
|
| + if (state.styledElement()->hovered())
|
| + return 0;
|
| + if (state.styledElement()->active())
|
| + return 0;
|
| + // There is always only one focused element.
|
| + if (state.styledElement()->focused())
|
| + return 0;
|
| if (parentElementPreventsSharing(state.element()->parentElement()))
|
| return 0;
|
| if (state.styledElement()->hasScopedHTMLStyleChild())
|
|
|