border-width: initial and border-color: initial cannot be removed via CSSOM.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2011 02:29:33 +0000 (02:29 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2011 02:29:33 +0000 (02:29 +0000)
commit0c137a8041160281f0d0a2fdae80f24d00a7a37b
tree6d702c290fc696cedde11b7fb9ee20bca434b1a6
parentc21ca55b1b447d1dde3d6b8813b19b0a91a529f2
border-width: initial and border-color: initial cannot be removed via CSSOM.
<http://webkit.org/b/68551>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/css/cssom-remove-shorthand-property.html

When asked to remove a shorthand property, we should toss out both the
sub-properties of that shorthand as well as the shorthand itself, should the
declaration contain it. The latter part was missing in our implementation.

* css/CSSMutableStyleDeclaration.h:
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
(WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):

    Changed to return true only if something was actually removed.

LayoutTests:

Add a test verifying that shorthand properties can be added/removed
via CSSOM'S CSSStyleDeclaration interface.

* fast/css/cssom-remove-shorthand-property-expected.txt: Added.
* fast/css/cssom-remove-shorthand-property.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/cssom-remove-shorthand-property-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/cssom-remove-shorthand-property.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSMutableStyleDeclaration.cpp
Source/WebCore/css/CSSMutableStyleDeclaration.h