Cache style declaration CSSOM wrappers directly on MutableStylePropertySet.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Jul 2013 00:58:36 +0000 (00:58 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Jul 2013 00:58:36 +0000 (00:58 +0000)
commitd3983e9bbd46cad2aaa6374c472006fa234ddae4
tree068907dda85041bc918dfb96f136ba5b69409504
parentb3cd3e8bc94e48db7118d480228a94f8511b2f86
Cache style declaration CSSOM wrappers directly on MutableStylePropertySet.
<http://webkit.org/b/118883>

Reviewed by Gavin Barraclough

Merge https://chromium.googlesource.com/chromium/blink/+/183bcd51eb0e79cab930cf46695df05dc793630f
From Blink r153700 by <ager@chromium.org>:

In my measurements the mapping is adding more overhead than just having a field
in all MutableStylePropertySet objects. So this saves memory and makes access
faster.

* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::MutableStylePropertySet):
(WebCore::MutableStylePropertySet::~MutableStylePropertySet):
(WebCore::StylePropertySet::hasCSSOMWrapper):
(WebCore::MutableStylePropertySet::cssStyleDeclaration):
(WebCore::MutableStylePropertySet::ensureCSSStyleDeclaration):
(WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::StylePropertySet):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StylePropertySet.h