Changeset 11579 in webkit


Ignore:
Timestamp:
Dec 13, 2005 6:22:03 PM (18 years ago)
Author:
bdakin
Message:

Bug #:
Submitted by:
Reviewed by:

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog-2005-12-19

    r11577 r11579  
     12005-12-13  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Hyatt and Darin.
     4
     5        Fix for <rdar://problem/4335884> REGRESSION: assertion failure
     6        after adding DOM element (render_container.cpp:365: beforeChild->
     7        parent() == this).
     8
     9        When adding a child, tables should send the next to last box
     10        instead of the last box as beforeChild because that is what
     11        RenderContainer::insertChildNode() expects. RenderContainer
     12        ::insertChildNode() will not recurse to the correct box for
     13        tables because tables won't pass the isAnonymousBlock() check,
     14        so tables must send the correct information to start with.
     15
     16        * khtml/rendering/render_table.cpp:
     17        (RenderTable::addChild): Keep track of the nextToLastBox and
     18        send that one to the other addChild() functions instead of the
     19        lastBox.
     20
    121=== Safari-521~5 ===
    222
  • trunk/WebCore/khtml/rendering/render_table.cpp

    r11421 r11579  
    141141            } else {
    142142                RenderObject *lastBox = beforeChild;
     143                RenderObject *nextToLastBox = beforeChild;
    143144                while (lastBox && lastBox->parent()->isAnonymous() &&
    144                         !lastBox->isTableSection() && lastBox->style()->display() != TABLE_CAPTION)
     145                        !lastBox->isTableSection() && lastBox->style()->display() != TABLE_CAPTION) {
     146                    nextToLastBox = lastBox;
    145147                    lastBox = lastBox->parent();
     148                }
    146149                if (lastBox && lastBox->isAnonymous()) {
    147                     lastBox->addChild(child, beforeChild);
     150                    lastBox->addChild(child, nextToLastBox);
    148151                    return;
    149152                } else {
Note: See TracChangeset for help on using the changeset viewer.