Changeset 108415 in webkit


Ignore:
Timestamp:
Feb 21, 2012 4:34:19 PM (12 years ago)
Author:
adamk@chromium.org
Message:

ContainerNode::childrenChanged must be called immediately after removing children
https://bugs.webkit.org/show_bug.cgi?id=79162

Reviewed by Ryosuke Niwa.

Source/WebCore:

In r108152, a call to childrenChanged() was erroneously moved
below the call to child->removedFromDocument(). This breaks, at the
least, the behavior of the <title> element. This patch corrects the
mistake and adds a test.

Test: fast/dom/title-directionality-removeChild.html

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeChild):

LayoutTests:

  • fast/dom/title-directionality-removeChild-expected.txt: Added.
  • fast/dom/title-directionality-removeChild.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r108412 r108415  
     12012-02-21  Adam Klein  <adamk@chromium.org>
     2
     3        ContainerNode::childrenChanged must be called immediately after removing children
     4        https://bugs.webkit.org/show_bug.cgi?id=79162
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * fast/dom/title-directionality-removeChild-expected.txt: Added.
     9        * fast/dom/title-directionality-removeChild.html: Added.
     10
    1112012-02-21  Tom Sepez  <tsepez@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r108410 r108415  
     12012-02-21  Adam Klein  <adamk@chromium.org>
     2
     3        ContainerNode::childrenChanged must be called immediately after removing children
     4        https://bugs.webkit.org/show_bug.cgi?id=79162
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        In r108152, a call to childrenChanged() was erroneously moved
     9        below the call to child->removedFromDocument(). This breaks, at the
     10        least, the behavior of the <title> element. This patch corrects the
     11        mistake and adds a test.
     12
     13        Test: fast/dom/title-directionality-removeChild.html
     14
     15        * dom/ContainerNode.cpp:
     16        (WebCore::ContainerNode::removeChild):
     17
    1182012-02-21  Luke Macpherson   <macpherson@chromium.org>
    219
  • trunk/Source/WebCore/dom/ContainerNode.cpp

    r108152 r108415  
    479479    removeBetween(prev, next, child.get());
    480480
     481    childrenChanged(false, prev, next, -1);
     482
    481483    if (child->inDocument())
    482484        child->removedFromDocument();
     
    484486        child->removedFromTree(true);
    485487
    486     // Dispatch post-removal mutation events
    487     childrenChanged(false, prev, next, -1);
    488488    dispatchSubtreeModifiedEvent();
    489489
Note: See TracChangeset for help on using the changeset viewer.