Changeset 115458 in webkit


Ignore:
Timestamp:
Apr 27, 2012 11:44:03 AM (12 years ago)
Author:
jchaffraix@webkit.org
Message:

NULL-deref in RenderBox::clippedOverflowRectForRepaint
https://bugs.webkit.org/show_bug.cgi?id=84774

Reviewed by Tony Chang.

Source/WebCore:

Test: fast/inline/crash-new-continuation-with-outline.html

The bug comes from trying to repaint the :after content as part of updateBeforeAfterContent.
The repainting logic would query the yet-to-be-inserted continuation(). Then we would crash in
RenderBox::clippedOverflowRectForRepaint as we didn't have an enclosingLayer() (which any
RenderObject in the tree will have).

The fix is to check in RenderInline::clippedOverflowRectForRepaint that our continuation()
is properly inserted in the tree. We could check that it isRooted() but it's an overkill here.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::clippedOverflowRectForRepaint):

LayoutTests:

  • fast/inline/crash-new-continuation-with-outline-expected.txt: Added.
  • fast/inline/crash-new-continuation-with-outline.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r115453 r115458  
     12012-04-27  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        NULL-deref in RenderBox::clippedOverflowRectForRepaint
     4        https://bugs.webkit.org/show_bug.cgi?id=84774
     5
     6        Reviewed by Tony Chang.
     7
     8        * fast/inline/crash-new-continuation-with-outline-expected.txt: Added.
     9        * fast/inline/crash-new-continuation-with-outline.html: Added.
     10
    1112012-04-27  Dirk Pranke  <dpranke@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r115454 r115458  
     12012-04-27  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        NULL-deref in RenderBox::clippedOverflowRectForRepaint
     4        https://bugs.webkit.org/show_bug.cgi?id=84774
     5
     6        Reviewed by Tony Chang.
     7
     8        Test: fast/inline/crash-new-continuation-with-outline.html
     9
     10        The bug comes from trying to repaint the :after content as part of updateBeforeAfterContent.
     11        The repainting logic would query the yet-to-be-inserted continuation(). Then we would crash in
     12        RenderBox::clippedOverflowRectForRepaint as we didn't have an enclosingLayer() (which any
     13        RenderObject in the tree will have).
     14
     15        The fix is to check in RenderInline::clippedOverflowRectForRepaint that our continuation()
     16        is properly inserted in the tree. We could check that it isRooted() but it's an overkill here.
     17
     18        * rendering/RenderInline.cpp:
     19        (WebCore::RenderInline::clippedOverflowRectForRepaint):
     20
    1212012-04-27  Antti Koivisto  <antti@apple.com>
    222
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r114936 r115458  
    10591059        }
    10601060
    1061         if (continuation() && !continuation()->isInline()) {
     1061        if (continuation() && !continuation()->isInline() && continuation()->parent()) {
    10621062            LayoutRect contRect = continuation()->rectWithOutlineForRepaint(repaintContainer, ow);
    10631063            r.unite(contRect);
Note: See TracChangeset for help on using the changeset viewer.