Changeset 167001 in webkit


Ignore:
Timestamp:
Apr 8, 2014 11:18:00 PM (10 years ago)
Author:
mihnea@adobe.com
Message:

[CSSRegions] Crash when video in region exits fullscreen
https://bugs.webkit.org/show_bug.cgi?id=131366

Reviewed by Andrei Bucur.

Source/WebCore:

After fix for https://bugs.webkit.org/show_bug.cgi?id=130392, we compute the region ranges
information for inline elements collected in named flows with associated region chains.
The algorithm for this computation, implemented in RenderFlowThread::getRegionRangeForBox,
walks up the render tree trying to find the top-most unsplittable box under the named flow
in the case where the region ranges information is not available.

As this traversal works properly only when the starting box is not detached from the render tree,
i changed the named flow information clearing in RenderBlock::collapseAnonymousBoxChild
to occur before the child to be collapsed is removed from the render tree.

Test: fast/regions/full-screen-video-in-region-crash.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::collapseAnonymousBoxChild):

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::getRegionRangeForBox):

LayoutTests:

  • fast/regions/full-screen-video-in-region-crash-expected.txt: Added.
  • fast/regions/full-screen-video-in-region-crash.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167000 r167001  
     12014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Crash when video in region exits fullscreen
     4        https://bugs.webkit.org/show_bug.cgi?id=131366
     5
     6        Reviewed by Andrei Bucur.
     7
     8        * fast/regions/full-screen-video-in-region-crash-expected.txt: Added.
     9        * fast/regions/full-screen-video-in-region-crash.html: Added.
     10
    1112014-04-08  Alexey Proskuryakov  <ap@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r166999 r167001  
     12014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Crash when video in region exits fullscreen
     4        https://bugs.webkit.org/show_bug.cgi?id=131366
     5
     6        Reviewed by Andrei Bucur.
     7
     8        After fix for https://bugs.webkit.org/show_bug.cgi?id=130392, we compute the region ranges
     9        information for inline elements collected in named flows with associated region chains.
     10        The algorithm for this computation, implemented in RenderFlowThread::getRegionRangeForBox,
     11        walks up the render tree trying to find the top-most unsplittable box under the named flow
     12        in the case where the region ranges information is not available.
     13
     14        As this traversal works properly only when the starting box is not detached from the render tree,
     15        i changed the named flow information clearing in RenderBlock::collapseAnonymousBoxChild
     16        to occur before the child to be collapsed is removed from the render tree.
     17
     18        Test: fast/regions/full-screen-video-in-region-crash.html
     19
     20        * rendering/RenderBlock.cpp:
     21        (WebCore::RenderBlock::collapseAnonymousBoxChild):
     22        * rendering/RenderFlowThread.cpp:
     23        (WebCore::RenderFlowThread::getRegionRangeForBox):
     24
    1252014-04-08  Chris Fleizach  <cfleizach@apple.com>
    226
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r166489 r167001  
    10371037    RenderFlowThread* childFlowThread = child->flowThreadContainingBlock();
    10381038    CurrentRenderFlowThreadMaintainer flowThreadMaintainer(childFlowThread);
     1039    if (childFlowThread && childFlowThread->isRenderNamedFlowThread())
     1040        toRenderNamedFlowThread(childFlowThread)->removeFlowChildInfo(child);
    10391041
    10401042    parent->removeChildInternal(*child, child->hasLayer() ? NotifyChildren : DontNotifyChildren);
     
    10421044    // Delete the now-empty block's lines and nuke it.
    10431045    child->deleteLines();
    1044     if (childFlowThread && childFlowThread->isRenderNamedFlowThread())
    1045         toRenderNamedFlowThread(childFlowThread)->removeFlowChildInfo(child);
    10461046    child->destroy();
    10471047}
  • trunk/Source/WebCore/rendering/RenderFlowThread.cpp

    r166715 r167001  
    780780        if (cb->isUnsplittableForPagination())
    781781            topMostUnsplittable = cb;
     782        ASSERT(cb->parent());
    782783        cb = cb->parent()->enclosingBox();
     784        ASSERT(cb);
    783785    } while (!cb->isRenderFlowThread());
    784786
Note: See TracChangeset for help on using the changeset viewer.