Changeset 140206 in webkit


Ignore:
Timestamp:
Jan 18, 2013 2:12:53 PM (11 years ago)
Author:
inferno@chromium.org
Message:

Heap-use-after-free in WebCore::RenderObject::isDescendantOf
https://bugs.webkit.org/show_bug.cgi?id=107226

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/block/float/overhanging-float-not-removed-crash.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
Skip anonymous blocks in the chain to get the enclosing block and
be able to correctly mark the overhanging floats in the next siblings.

LayoutTests:

  • fast/block/float/overhanging-float-not-removed-crash-expected.txt: Added.
  • fast/block/float/overhanging-float-not-removed-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140202 r140206  
     12013-01-18  Abhishek Arya  <inferno@chromium.org>
     2
     3        Heap-use-after-free in WebCore::RenderObject::isDescendantOf
     4        https://bugs.webkit.org/show_bug.cgi?id=107226
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/block/float/overhanging-float-not-removed-crash-expected.txt: Added.
     9        * fast/block/float/overhanging-float-not-removed-crash.html: Added.
     10
    1112013-01-18  Chris Hopman  <cjhopman@google.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r140202 r140206  
     12013-01-18  Abhishek Arya  <inferno@chromium.org>
     2
     3        Heap-use-after-free in WebCore::RenderObject::isDescendantOf
     4        https://bugs.webkit.org/show_bug.cgi?id=107226
     5
     6        Reviewed by David Hyatt.
     7
     8        Test: fast/block/float/overhanging-float-not-removed-crash.html
     9
     10        * rendering/RenderBox.cpp:
     11        (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
     12        Skip anonymous blocks in the chain to get the enclosing block and
     13        be able to correctly mark the overhanging floats in the next siblings.
     14
    1152013-01-18  Chris Hopman  <cjhopman@google.com>
    216
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r140068 r140206  
    180180
    181181        if (parentBlock) {
     182            // Need to skip anonymous blocks in our ancestor chain since our overhanging floats
     183            // can be in the next siblings of enclosing block.
     184            while (parentBlock && parentBlock->isAnonymousBlock())
     185                parentBlock = parentBlock->containingBlock();
     186            ASSERT(parentBlock);
     187
    182188            RenderObject* parent = parentBlock->parent();
    183189            if (parent && parent->isFlexibleBoxIncludingDeprecated())
Note: See TracChangeset for help on using the changeset viewer.