Changeset 106191 in webkit


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

REGRESSION (r94016): Element with visibility:hidden but visible descendant may not be properly repainted
https://bugs.webkit.org/show_bug.cgi?id=76126

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html

fast/layers/scroll-no-visible-content-but-visible-descendant.html

The optimization missed out that if the current layer does not have some visible content
(m_hasVisibleContent is false), a descendant could totally be visible and would need to
have its repaint rectangles recomputed.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
Bail out only if the layer doesn't have visible content AND no visible descendants.

LayoutTests:

Added testing for a layer with no visible content but one of its descendant has some visible content.
The reverse case is already profusely tested.

  • fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html: Added.
  • fast/layers/scroll-no-visible-content-but-visible-descendant.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106188 r106191  
     12012-01-28  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION (r94016): Element with visibility:hidden but visible descendant may not be properly repainted
     4        https://bugs.webkit.org/show_bug.cgi?id=76126
     5
     6        Reviewed by Simon Fraser.
     7
     8        Added testing for a layer with no visible content but one of its descendant has some visible content.
     9        The reverse case is already profusely tested.
     10
     11        * fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html: Added.
     12        * fast/layers/scroll-no-visible-content-but-visible-descendant.html: Added.
     13
    1142012-01-28 Hajime Morita  <morrita@google.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r106190 r106191  
     12012-01-28  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION (r94016): Element with visibility:hidden but visible descendant may not be properly repainted
     4        https://bugs.webkit.org/show_bug.cgi?id=76126
     5
     6        Reviewed by Simon Fraser.
     7
     8        Tests: fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html
     9               fast/layers/scroll-no-visible-content-but-visible-descendant.html
     10
     11        The optimization missed out that if the current layer does not have some visible content
     12        (m_hasVisibleContent is false), a descendant could totally be visible and would need to
     13        have its repaint rectangles recomputed.
     14
     15        * rendering/RenderLayer.cpp:
     16        (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
     17        Bail out only if the layer doesn't have visible content AND no visible descendants.
     18
    1192012-01-27  Chris Marrin  <cmarrin@apple.com>
    220
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r105820 r106191  
    452452void RenderLayer::updateLayerPositionsAfterScroll(UpdateLayerPositionsAfterScrollFlags flags)
    453453{
     454    ASSERT(!m_visibleDescendantStatusDirty);
    454455    ASSERT(!m_visibleContentStatusDirty);
    455456
    456     // If we have no visible content, there is no point recomputing our rectangles as
    457     // they will be empty. If our visibility changes, we are expected to recompute all
    458     // our positions anyway.
    459     if (!m_hasVisibleContent)
     457    // If we have no visible content and no visible descendants, there is no point recomputing
     458    // our rectangles as they will be empty. If our visibility changes, we are expected to
     459    // recompute all our positions anyway.
     460    if (!m_hasVisibleDescendant && !m_hasVisibleContent)
    460461        return;
    461462
Note: See TracChangeset for help on using the changeset viewer.