Changeset 161054 in webkit


Ignore:
Timestamp:
Dec 24, 2013 1:25:38 AM (10 years ago)
Author:
mihnea@adobe.com
Message:

[CSSRegions] Crash while repainting an invalid region
https://bugs.webkit.org/show_bug.cgi?id=126152

Reviewed by Daniel Bates.

Source/WebCore:

An invalid region, part of a dependency cycle, should not attempt to repaint content from
its associated named flow, otherwise there may be the case of an infinite repaint cycle,
resulting in a crash due to a stack overflow.

Test: fast/regions/repaint/invalid-region-repaint-crash.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::repaintIncludingDescendants):

LayoutTests:

  • fast/regions/repaint/invalid-region-repaint-crash-expected.txt: Added.
  • fast/regions/repaint/invalid-region-repaint-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r161052 r161054  
     12013-12-24  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Crash while repainting an invalid region
     4        https://bugs.webkit.org/show_bug.cgi?id=126152
     5
     6        Reviewed by Daniel Bates.
     7
     8        * fast/regions/repaint/invalid-region-repaint-crash-expected.txt: Added.
     9        * fast/regions/repaint/invalid-region-repaint-crash.html: Added.
     10
    1112013-12-24  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r161051 r161054  
     12013-12-24  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Crash while repainting an invalid region
     4        https://bugs.webkit.org/show_bug.cgi?id=126152
     5
     6        Reviewed by Daniel Bates.
     7
     8        An invalid region, part of a dependency cycle, should not attempt to repaint content from
     9        its associated named flow, otherwise there may be the case of an infinite repaint cycle,
     10        resulting in a crash due to a stack overflow.
     11
     12        Test: fast/regions/repaint/invalid-region-repaint-crash.html
     13
     14        * rendering/RenderLayer.cpp:
     15        (WebCore::RenderLayer::repaintIncludingDescendants):
     16
    1172013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r161028 r161054  
    62746274
    62756275    // If this is a region, we must also repaint the flow thread's layer since it is the one
    6276     // doing the actual painting of the flowed content.
    6277     if (renderer().isRenderNamedFlowFragmentContainer())
    6278         toRenderBlockFlow(&renderer())->renderNamedFlowFragment()->flowThread()->layer()->repaintIncludingDescendants();
     6276    // doing the actual painting of the flowed content, but only if the region is valid.
     6277    if (renderer().isRenderNamedFlowFragmentContainer()) {
     6278        RenderNamedFlowFragment* region = toRenderBlockFlow(renderer()).renderNamedFlowFragment();
     6279        if (region->isValid())
     6280            region->flowThread()->layer()->repaintIncludingDescendants();
     6281    }
    62796282}
    62806283
Note: See TracChangeset for help on using the changeset viewer.