Changeset 109142 in webkit


Ignore:
Timestamp:
Feb 28, 2012 1:00:02 PM (12 years ago)
Author:
inferno@chromium.org
Message:

Crash due to accessing removed continuation in multi-column layout.
https://bugs.webkit.org/show_bug.cgi?id=78417

Reviewed by David Hyatt.

Source/WebCore:

This patch addresses two problems:

  1. Run-in block got split due to addition of a column-span child.

The clone part was incorrectly intruding into the sibling block,
even when it was part of the continuation chain.

  1. Like r73296, we don't need to set continuation on an

anonymous block since we haven't split a real element.

Test: fast/multicol/span/runin-continuation-crash.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
(WebCore::RenderBlock::handleRunInChild):

LayoutTests:

  • fast/multicol/span/runin-continuation-crash-expected.txt: Added.
  • fast/multicol/span/runin-continuation-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r109140 r109142  
     12012-02-28  Abhishek Arya  <inferno@chromium.org>
     2
     3        Crash due to accessing removed continuation in multi-column layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=78417
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/multicol/span/runin-continuation-crash-expected.txt: Added.
     9        * fast/multicol/span/runin-continuation-crash.html: Added.
     10
    1112012-02-28  Abhishek Arya  <inferno@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r109140 r109142  
     12012-02-28  Abhishek Arya  <inferno@chromium.org>
     2
     3        Crash due to accessing removed continuation in multi-column layout.
     4        https://bugs.webkit.org/show_bug.cgi?id=78417
     5
     6        Reviewed by David Hyatt.
     7
     8        This patch addresses two problems:
     9        1. Run-in block got split due to addition of a column-span child.
     10        The clone part was incorrectly intruding into the sibling block,
     11        even when it was part of the continuation chain.
     12        2. Like r73296, we don't need to set continuation on an
     13        anonymous block since we haven't split a real element.
     14
     15        Test: fast/multicol/span/runin-continuation-crash.html
     16
     17        * rendering/RenderBlock.cpp:
     18        (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
     19        (WebCore::RenderBlock::handleRunInChild):
     20
    1212012-02-28  Abhishek Arya  <inferno@chromium.org>
    222
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r109140 r109142  
    853853            // our block into continuations.
    854854            RenderBoxModelObject* oldContinuation = continuation();
    855             setContinuation(newBox);
     855
     856            // When we split an anonymous block, there's no need to do any continuation hookup,
     857            // since we haven't actually split a real element.
     858            if (!isAnonymousBlock())
     859                setContinuation(newBox);
    856860
    857861            // Someone may have put a <p> inside a <q>, causing a split.  When this happens, the :after content
     
    17601764    // FIXME: We don't handle non-block elements with run-in for now.
    17611765    if (!child->isRenderBlock())
     1766        return false; 
     1767    // Run-in child shouldn't intrude into the sibling block if it is part of a
     1768    // continuation chain. In that case, treat it as a normal block.
     1769    if (child->isElementContinuation() || child->virtualContinuation())
    17621770        return false;
    17631771
Note: See TracChangeset for help on using the changeset viewer.