⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 117032 in webkit


Ignore:
Timestamp:
May 14, 2012, 11:12:05 PM (14 years ago)
Author:
timothy_horton@apple.com
Message:

RenderLayer::repaintRectIncludingDescendants shouldn't include repaint rects of composited descendants
https://bugs.webkit.org/show_bug.cgi?id=86429
<rdar://problem/11445132>

Reviewed by Simon Fraser.

Change repaintRectIncludingDescendants to not include repaint rects for composited child layers,
and rename the function to make it more clear that that's what it does now.

No new tests, scrolling performance optimization.

  • page/FrameView.cpp:

(WebCore::FrameView::scrollContentsFastPath):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):

  • rendering/RenderLayer.h:

(RenderLayer):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117029 r117032  
     12012-05-14  Tim Horton  <timothy_horton@apple.com>
     2
     3        RenderLayer::repaintRectIncludingDescendants shouldn't include repaint rects of composited descendants
     4        https://bugs.webkit.org/show_bug.cgi?id=86429
     5        <rdar://problem/11445132>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Change repaintRectIncludingDescendants to not include repaint rects for composited child layers,
     10        and rename the function to make it more clear that that's what it does now.
     11
     12        No new tests, scrolling performance optimization.
     13
     14        * page/FrameView.cpp:
     15        (WebCore::FrameView::scrollContentsFastPath):
     16        * rendering/RenderLayer.cpp:
     17        (WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
     18        * rendering/RenderLayer.h:
     19        (RenderLayer):
     20
    1212012-05-14  Gavin Peters  <gavinp@chromium.org>
    222
  • trunk/Source/WebCore/page/FrameView.cpp

    r117005 r117032  
    14901490            continue;
    14911491#endif
    1492         IntRect updateRect = pixelSnappedIntRect(renderBox->layer()->repaintRectIncludingDescendants());
     1492        IntRect updateRect = pixelSnappedIntRect(renderBox->layer()->repaintRectIncludingNonCompositingDescendants());
    14931493        updateRect = contentsToRootView(updateRect);
    14941494        if (!isCompositedContentLayer && clipsRepaints())
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r117004 r117032  
    453453}
    454454
    455 LayoutRect RenderLayer::repaintRectIncludingDescendants() const
     455LayoutRect RenderLayer::repaintRectIncludingNonCompositingDescendants() const
    456456{
    457457    LayoutRect repaintRect = m_repaintRect;
    458     for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
    459         repaintRect.unite(child->repaintRectIncludingDescendants());
     458    for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
     459        // Don't include repaint rects for composited child layers; they will paint themselves and have a different origin.
     460        if (child->isComposited())
     461            continue;
     462
     463        repaintRect.unite(child->repaintRectIncludingNonCompositingDescendants());
     464    }
    460465    return repaintRect;
    461466}
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r116790 r117032  
    512512    // Return a cached repaint rect, computed relative to the layer renderer's containerForRepaint.
    513513    LayoutRect repaintRect() const { return m_repaintRect; }
    514     LayoutRect repaintRectIncludingDescendants() const;
     514    LayoutRect repaintRectIncludingNonCompositingDescendants() const;
    515515
    516516    enum UpdateLayerPositionsAfterScrollFlag {
Note: See TracChangeset for help on using the changeset viewer.