Changeset 94016 in webkit


Ignore:
Timestamp:
Aug 29, 2011 2:32:06 PM (13 years ago)
Author:
jchaffraix@webkit.org
Message:

Assertion failure in RenderLayer::computeRepaintRects when scrolling
https://bugs.webkit.org/show_bug.cgi?id=67140

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/repaint/scroll-fixed-layer-with-no-visible-content.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::computeRepaintRects): Fixed style after r93837.

(WebCore::RenderLayer::updateLayerPositionsAfterScroll): Tweaked the code
to bail early if our layer has no visible content. This avoids the ASSERT
and also makes sense as we shouldn't repaint / update empty layers.

LayoutTests:

This test checks that a fixed element with no visible content does not ASSERT and
renders properly.

  • fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.txt: Added.
  • fast/repaint/scroll-fixed-layer-with-no-visible-content.html: Added.
  • platform/chromium-cg-mac/fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.png: Added.
  • platform/chromium-win/fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.png: Added.
  • platform/mac/fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.png: Added.
Location:
trunk
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r94006 r94016  
     12011-08-29  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Assertion failure in RenderLayer::computeRepaintRects when scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=67140
     5
     6        Reviewed by David Hyatt.
     7
     8        This test checks that a fixed element with no visible content does not ASSERT and
     9        renders properly.
     10
     11        * fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.txt: Added.
     12        * fast/repaint/scroll-fixed-layer-with-no-visible-content.html: Added.
     13        * platform/chromium-cg-mac/fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.png: Added.
     14        * platform/chromium-win/fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.png: Added.
     15        * platform/mac/fast/repaint/scroll-fixed-layer-with-no-visible-content-expected.png: Added.
     16
    1172011-08-29  Nayan Kumar K  <nayankk@motorola.com>
    218
  • trunk/Source/WebCore/ChangeLog

    r94011 r94016  
     12011-08-29  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Assertion failure in RenderLayer::computeRepaintRects when scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=67140
     5
     6        Reviewed by David Hyatt.
     7
     8        Test: fast/repaint/scroll-fixed-layer-with-no-visible-content.html
     9
     10        * rendering/RenderLayer.cpp:
     11        (WebCore::RenderLayer::computeRepaintRects): Fixed style after r93837.
     12
     13        (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Tweaked the code
     14        to bail early if our layer has no visible content. This avoids the ASSERT
     15        and also makes sense as we shouldn't repaint / update empty layers.
     16
    1172011-08-29  Anna Cavender  <annacc@chromium.org>
    218
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r93941 r94016  
    373373    ASSERT(!m_visibleContentStatusDirty);
    374374
    375      RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
    376      m_repaintRect = renderer()->clippedOverflowRectForRepaint(repaintContainer);
     375    RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
     376    m_repaintRect = renderer()->clippedOverflowRectForRepaint(repaintContainer);
    377377    m_outlineBox = renderer()->outlineBoundsForRepaint(repaintContainer, cachedOffset);
    378378}
     
    389389void RenderLayer::updateLayerPositionsAfterScroll(bool fixed)
    390390{
     391    ASSERT(!m_visibleContentStatusDirty);
     392
     393    // If we have no visible content, there is no point recomputing our rectangles as
     394    // they will be empty. If our visibility changes, we are expected to recompute all
     395    // our positions anyway.
     396    if (!m_hasVisibleContent)
     397        return;
     398
    391399    updateLayerPosition();
    392400
Note: See TracChangeset for help on using the changeset viewer.