Changeset 110643 in webkit


Ignore:
Timestamp:
Mar 13, 2012 4:58:59 PM (12 years ago)
Author:
mitz@apple.com
Message:
<rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer
repaintContainer == this) at store.apple.com

https://bugs.webkit.org/show_bug.cgi?id=81051

Reviewed by Simon Fraser.

.:

  • ManualTests/inline-repaint-container.html: Added.

Source/WebCore:

Test: ManualTests/inline-repaint-container.html.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::clippedOverflowRectForRepaint): This function was not handling the
case of the repaint container being a descendant of the containing block correctly, leading
to the assertion failure, but also to a correctness bug seen in the new test. If the repaint
container is a descendant of the containing block, just return the rect in the repaint
container coordinates.

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r110595 r110643  
     12012-03-13  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer || repaintContainer == this) at store.apple.com
     4        https://bugs.webkit.org/show_bug.cgi?id=81051
     5
     6        Reviewed by Simon Fraser.
     7
     8        * ManualTests/inline-repaint-container.html: Added.
     9
    1102012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
    211
  • trunk/Source/WebCore/ChangeLog

    r110642 r110643  
     12012-03-13  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer || repaintContainer == this) at store.apple.com
     4        https://bugs.webkit.org/show_bug.cgi?id=81051
     5
     6        Reviewed by Simon Fraser.
     7
     8        Test: ManualTests/inline-repaint-container.html.
     9
     10        * rendering/RenderInline.cpp:
     11        (WebCore::RenderInline::clippedOverflowRectForRepaint): This function was not handling the
     12        case of the repaint container being a descendant of the containing block correctly, leading
     13        to the assertion failure, but also to a correctness bug seen in the new test. If the repaint
     14        container is a descendant of the containing block, just return the rect in the repaint
     15        container coordinates.
     16
    1172012-03-13  Dan Bernstein  <mitz@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r110224 r110643  
    10121012    // Now invalidate a rectangle.
    10131013    LayoutUnit ow = style() ? style()->outlineSize() : 0;
    1014    
     1014
     1015    bool hitRepaintContainer = false;
     1016
    10151017    // We need to add in the relative position offsets of any inlines (including us) up to our
    10161018    // containing block.
     
    10181020    for (const RenderObject* inlineFlow = this; inlineFlow && inlineFlow->isRenderInline() && inlineFlow != cb;
    10191021         inlineFlow = inlineFlow->parent()) {
    1020          if (inlineFlow->style()->position() == RelativePosition && inlineFlow->hasLayer())
     1022         if (inlineFlow == repaintContainer) {
     1023            hitRepaintContainer = true;
     1024            break;
     1025        }
     1026        if (inlineFlow->style()->position() == RelativePosition && inlineFlow->hasLayer())
    10211027            toRenderInline(inlineFlow)->layer()->relativePositionOffset(left, top);
    10221028    }
    10231029
    10241030    LayoutRect r(-ow + left, -ow + top, boundingBox.width() + ow * 2, boundingBox.height() + ow * 2);
     1031
     1032    if (hitRepaintContainer)
     1033        return r;
    10251034
    10261035    if (cb->hasColumns())
     
    10371046        r = intersection(repaintRect, boxRect);
    10381047    }
    1039    
    1040     // FIXME: need to ensure that we compute the correct repaint rect when the repaint container
    1041     // is an inline.
    1042     if (repaintContainer != this)
    1043         cb->computeRectForRepaint(repaintContainer, r);
     1048
     1049    cb->computeRectForRepaint(repaintContainer, r);
    10441050
    10451051    if (ow) {
Note: See TracChangeset for help on using the changeset viewer.