Reviewed by Darin.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2005 23:09:20 +0000 (23:09 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2005 23:09:20 +0000 (23:09 +0000)
commitce4e1d116724a790045846b3af99cd6edaa68c70
tree723341cda4e5bd5022a81862861c04f9ed518a95
parent8e8f047ef36ea8b895a42139d60b2044566c49b2
    Reviewed by Darin.
        Landed by David Harrison.

        Test cases added: None.  Fixes existing tests.

        * khtml/ecma/kjs_dom.cpp:
        Attribute values are writable

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createAttributeNS):
        Update for new AttrImpl constructor.

        * khtml/xml/dom_elementimpl.cpp:
        (AttributeImpl::allocateImpl):
        Update for new AttrImpl constructor.

        (AttrImpl::AttrImpl):
        Initialize m_ignoreChildCount to 0. If createTextChild.
        is true, create a child text node with the contents
        of the attribute value.

        (AttrImpl::setValue):
        Remove all children and create a new text node with the contents
        of the attribute value.

        (AttrImpl::cloneNode):
        Make sure to clone any children.

        (AttrImpl::childrenChanged):
        If m_ignoreChildrenChanged is 0, update the attribute value.

        * khtml/xml/dom_elementimpl.h:
        Add childrenChanged, update AttrImpl constructor and
        add m_ignoreChildrenChanged to AttrImpl.

        * khtml/xml/dom_nodeimpl.cpp:
        (DOM::NodeImpl::normalize):
        If an element has attributes, make sure to normalize them.

        * layout-tests/dom/html/level1/core/hc_attrappendchild1-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrappendchild3-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrappendchild6-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrchildnodes1-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrchildnodes2-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrclonenode1-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrcreatetextnode-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrfirstchild-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrhaschildnodes-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrinsertbefore1-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrinsertbefore2-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrinsertbefore3-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrinsertbefore4-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrlastchild-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrnormalize-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrremovechild1-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrreplacechild1-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrreplacechild2-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrsetvalue1-expected.txt:
        * layout-tests/dom/html/level1/core/hc_attrsetvalue2-expected.txt:
        * layout-tests/dom/html/level1/core/hc_elementnormalize2-expected.txt:
        These tests pass now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/dom/html/level1/core/hc_attrappendchild1-expected.txt
LayoutTests/dom/html/level1/core/hc_attrappendchild3-expected.txt
LayoutTests/dom/html/level1/core/hc_attrappendchild6-expected.txt
LayoutTests/dom/html/level1/core/hc_attrchildnodes1-expected.txt
LayoutTests/dom/html/level1/core/hc_attrchildnodes2-expected.txt
LayoutTests/dom/html/level1/core/hc_attrclonenode1-expected.txt
LayoutTests/dom/html/level1/core/hc_attrcreatetextnode-expected.txt
LayoutTests/dom/html/level1/core/hc_attrfirstchild-expected.txt
LayoutTests/dom/html/level1/core/hc_attrhaschildnodes-expected.txt
LayoutTests/dom/html/level1/core/hc_attrinsertbefore1-expected.txt
LayoutTests/dom/html/level1/core/hc_attrinsertbefore2-expected.txt
LayoutTests/dom/html/level1/core/hc_attrinsertbefore3-expected.txt
LayoutTests/dom/html/level1/core/hc_attrinsertbefore4-expected.txt
LayoutTests/dom/html/level1/core/hc_attrlastchild-expected.txt
LayoutTests/dom/html/level1/core/hc_attrnormalize-expected.txt
LayoutTests/dom/html/level1/core/hc_attrremovechild1-expected.txt
LayoutTests/dom/html/level1/core/hc_attrreplacechild1-expected.txt
LayoutTests/dom/html/level1/core/hc_attrreplacechild2-expected.txt
LayoutTests/dom/html/level1/core/hc_attrsetvalue1-expected.txt
LayoutTests/dom/html/level1/core/hc_attrsetvalue2-expected.txt
LayoutTests/dom/html/level1/core/hc_elementnormalize2-expected.txt
WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/xml/dom_docimpl.cpp
WebCore/khtml/xml/dom_elementimpl.cpp
WebCore/khtml/xml/dom_elementimpl.h
WebCore/khtml/xml/dom_nodeimpl.cpp