std::bitset<>::test() does unnecessary bounds checks on CSSPropertyID bitsets
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2014 08:16:15 +0000 (08:16 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2014 08:16:15 +0000 (08:16 +0000)
commit70c667718f32e618343bd17544e665cb295c2693
tree1f6927e7613acbeabcfbcbc6e68456b6a0a60adb
parent6347c73b3db8652723f3281325ff2847957e8ad4
std::bitset<>::test() does unnecessary bounds checks on CSSPropertyID bitsets
https://bugs.webkit.org/show_bug.cgi?id=131685

Patch by Zan Dobersek <zdobersek@igalia.com> on 2014-04-28
Reviewed by Darin Adler.

Use std::bitset<>::operator[]() instead of std::bitset<>::test() to avoid
bounds checks which are not necessary as long as a CSSPropertyID value is used.

* css/CSSParser.cpp:
(WebCore::filterProperties):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::asText):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::CascadedProperties::hasProperty):
(WebCore::StyleResolver::CascadedProperties::set):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp