Separate mutating CSSStyleDeclaration operations.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2012 17:05:39 +0000 (17:05 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2012 17:05:39 +0000 (17:05 +0000)
commit478fbd8599f23cd66f1d0da25e594b6c92c25360
tree2f4e4430cfae5330721c3ff29b9bcbbcb73661b4
parent4c4244bf5cf84c9d471db10a71ff268ac0f14e4c
Separate mutating CSSStyleDeclaration operations.
<http://webkit.org/b/89945>

Reviewed by Antti Koivisto.

Use separate paths for mutating the StylePropertySet wrapped by a CSSStyleDeclaration.
PropertySetCSSStyleDeclaration now has:

    - propertySet() const
    - ensureMutablePropertySet()

This is prep work for supporting immutable ElementAttributeData objects, the idea being
that calling ensureMutablePropertySet() may cause the element to convert its internal
attribute storage (which also holds the inline StylePropertySet.)

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::length):
(WebCore::PropertySetCSSStyleDeclaration::item):
(WebCore::PropertySetCSSStyleDeclaration::cssText):
(WebCore::PropertySetCSSStyleDeclaration::setCssText):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
(WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::removeProperty):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
(WebCore::PropertySetCSSStyleDeclaration::copy):
(WebCore::PropertySetCSSStyleDeclaration::makeMutable):
(WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
(WebCore::InlineCSSStyleDeclaration::didMutate):
(WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
* css/PropertySetCSSStyleDeclaration.h:
(PropertySetCSSStyleDeclaration):
(WebCore::PropertySetCSSStyleDeclaration::propertySet):
(WebCore::PropertySetCSSStyleDeclaration::ensureMutablePropertySet):

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