DOM Attribute tests on Dromaeo spends 2.7% of time in hasSelectorForAttribute
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jan 2012 16:00:06 +0000 (16:00 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jan 2012 16:00:06 +0000 (16:00 +0000)
commitb6cb0e6b319389352a80e367c43b62708697dc28
treee245a194ac24f7eb31e12dbd5ed468c48caa32db
parentf1184eb146541609df1cab9925e7f12274c44062
DOM Attribute tests on Dromaeo spends 2.7% of time in hasSelectorForAttribute
https://bugs.webkit.org/show_bug.cgi?id=75569

Reviewed by Andreas Kling.

Check needsStyleRecalc() first to avoid unnecessary hash lookups.

* dom/Element.cpp:
(WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp