Changeset 81812 in webkit


Ignore:
Timestamp:
Mar 23, 2011 3:04:02 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-03-23 Luiz Agostini <luiz.agostini@openbossa.org>

Reviewed by David Hyatt.

REGRESSION(81035): crash in RenderDetails::removeChild
https://bugs.webkit.org/show_bug.cgi?id=56773

  • fast/html/details-children-merge-crash-expected.txt: Added.
  • fast/html/details-children-merge-crash.html: Added.

2011-03-23 Luiz Agostini <luiz.agostini@openbossa.org>

Reviewed by David Hyatt.

REGRESSION(81035): crash in RenderDetails::removeChild
https://bugs.webkit.org/show_bug.cgi?id=56773

Test: fast/html/details-children-merge-crash.html

Preventing merging of RenderDetails's anonymous children.

  • rendering/RenderBlock.cpp: (WebCore::canMergeContiguousAnonymousBlocks):

Fixing RenderDetails::removeChild and cleaning m_marker in RenderDetails::destroy.

  • rendering/RenderDetails.cpp: (WebCore::RenderDetails::destroy): (WebCore::RenderDetails::removeChild):
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r81808 r81812  
     12011-03-23  Luiz Agostini  <luiz.agostini@openbossa.org>
     2
     3        Reviewed by David Hyatt.
     4
     5        REGRESSION(81035): crash in RenderDetails::removeChild
     6        https://bugs.webkit.org/show_bug.cgi?id=56773
     7
     8        * fast/html/details-children-merge-crash-expected.txt: Added.
     9        * fast/html/details-children-merge-crash.html: Added.
     10
    1112011-03-23  Xiaomei Ji  <xji@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r81807 r81812  
     12011-03-23  Luiz Agostini  <luiz.agostini@openbossa.org>
     2
     3        Reviewed by David Hyatt.
     4
     5        REGRESSION(81035): crash in RenderDetails::removeChild
     6        https://bugs.webkit.org/show_bug.cgi?id=56773
     7
     8        Test: fast/html/details-children-merge-crash.html
     9
     10        Preventing merging of RenderDetails's anonymous children.
     11
     12        * rendering/RenderBlock.cpp:
     13        (WebCore::canMergeContiguousAnonymousBlocks):
     14
     15        Fixing RenderDetails::removeChild and cleaning m_marker in RenderDetails::destroy.
     16
     17        * rendering/RenderDetails.cpp:
     18        (WebCore::RenderDetails::destroy):
     19        (WebCore::RenderDetails::removeChild):
     20
    1212011-03-23  Xiaomei Ji  <xji@chromium.org>
    222
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r81807 r81812  
    932932{
    933933    if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild->virtualContinuation())
     934        return false;
     935
     936    if (oldChild->parent() && oldChild->parent()->isDetails())
    934937        return false;
    935938
  • trunk/Source/WebCore/rendering/RenderDetails.cpp

    r81035 r81812  
    4747void RenderDetails::destroy()
    4848{
    49     if (m_marker)
     49    if (m_marker) {
    5050        m_marker->destroy();
     51        m_marker = 0;
     52    }
    5153
    5254    RenderBlock::destroy();
     
    8082void RenderDetails::removeChild(RenderObject* oldChild)
    8183{
    82     if (oldChild == m_summaryBlock || oldChild == m_contentBlock) {
     84    if (oldChild == m_summaryBlock) {
    8385        RenderBlock::removeChild(oldChild);
    8486        m_summaryBlock = 0;
     
    8688    }
    8789
    88     if (oldChild == m_mainSummary) {
     90    if (oldChild == m_contentBlock) {
     91        RenderBlock::removeChild(oldChild);
     92        m_contentBlock = 0;
     93        return;
     94    }
     95
     96    if (oldChild == m_mainSummary && m_summaryBlock) {
    8997        m_summaryBlock->removeChild(m_mainSummary);
    9098        return;
Note: See TracChangeset for help on using the changeset viewer.