Commit f8c6bc46 authored by esprehn@chromium.org's avatar esprehn@chromium.org

Remove some checks from SharedStyleFinder

Element::supportsStyleSharing() always returns false for elements that
are hovered, focused or active or are the :target so we don't need to
check those in the SharedStyleFinder.

Review URL: https://codereview.chromium.org/221463004

git-svn-id: svn://svn.chromium.org/blink/trunk@170613 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 453bb5b9
......@@ -212,16 +212,8 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const
return false;
if (candidate.isLink() != element().isLink())
return false;
if (candidate.hovered() != element().hovered())
return false;
if (candidate.active() != element().active())
return false;
if (candidate.focused() != element().focused())
return false;
if (candidate.shadowPseudoId() != element().shadowPseudoId())
return false;
if (candidate == document().cssTarget())
return false;
if (!sharingCandidateHasIdenticalStyleAffectingAttributes(candidate))
return false;
if (candidate.additionalPresentationAttributeStyle() != element().additionalPresentationAttributeStyle())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment