Reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2006 18:56:45 +0000 (18:56 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2006 18:56:45 +0000 (18:56 +0000)
commitbe448df902022f3bf29e05f8e8c042c8e1194837
tree25eef0f4cc5e0fa99bd1f809c108ea4a87a6c4a1
parent2ef85f2f360b97750d78a9e1d486bcd69a076d7a
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=7296
        JavaScript error not thrown when trying to set a CSS property to an invalid value

WebCore:
        * bindings/js/kjs_css.cpp:
        (KJS::DOMCSSStyleDeclaration::put): When not in Dashboard compatibility mode,
        raise exception for invalid values. Also removed an unnecessary call to
        removeProperty(), which prevented the property value from being preserved in
        error case.

        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::setProperty): Moved the handling of
        empty property values here. Also removed an unnecessary call to removeProperty().

LayoutTests:
        * fast/block/positioning/relayout-on-position-change.html: This test was setting
        position property to an invalid value, expecting that it will be removed. Changed
        it to set the property to an empty value (now the test passes in Firefox, too).

        * fast/dom/css-set-property-exception-expected.txt:
        * fast/dom/css-set-property-exception.html:
        Updated the results, added a new case and made the output more verbose.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/block/positioning/relayout-on-position-change.html
LayoutTests/fast/dom/css-set-property-exception-expected.txt
LayoutTests/fast/dom/css-set-property-exception.html
WebCore/ChangeLog
WebCore/bindings/js/kjs_css.cpp
WebCore/css/CSSMutableStyleDeclaration.cpp