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

Changeset 271191 in webkit


Ignore:
Timestamp:
Jan 5, 2021, 7:55:01 PM (6 years ago)
Author:
Simon Fraser
Message:

REGRESSION: animated iframe painted blank
https://bugs.webkit.org/show_bug.cgi?id=220231
Source/WebCore:

<rdar://problem/72793724>

Reviewed by Zalan Bujtas.

When an <iframe> on a fractional pixel boundary, on a non-Retina display, with
composited contents had its visibility toggled from 'hidden' to 'visible' we could
fail to parent the iframe content compositing layers, resulting in missing iframe
content.

This happened when the iframe's GraphicsLayer had a m_contentsClippingLayer (which
acts as the parent for the content layers) due to the fractional pixel offset.
When GraphicsLayerCA::setContentsVisible(true) was called, it would fail to call
noteSublayersChanged() because the iframe host layer has no m_contentsLayer,
but we do need to rebuild sublayers in this case.

Test: compositing/iframes/content-visibility-with-clipping.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setContentsVisible):

LayoutTests:

Reviewed by Zalan Bujtas.

  • compositing/iframes/content-visibility-with-clipping-expected.html: Added.
  • compositing/iframes/content-visibility-with-clipping.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271181 r271191  
     12021-01-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION: animated iframe painted blank
     4        https://bugs.webkit.org/show_bug.cgi?id=220231
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        * compositing/iframes/content-visibility-with-clipping-expected.html: Added.
     9        * compositing/iframes/content-visibility-with-clipping.html: Added.
     10
    1112021-01-05  Peng Liu  <peng.liu6@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r271188 r271191  
     12021-01-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION: animated iframe painted blank
     4        https://bugs.webkit.org/show_bug.cgi?id=220231
     5        <rdar://problem/72793724>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        When an <iframe> on a fractional pixel boundary, on a non-Retina display, with
     10        composited contents had its visibility toggled from 'hidden' to 'visible' we could
     11        fail to parent the iframe content compositing layers, resulting in missing iframe
     12        content.
     13
     14        This happened when the iframe's GraphicsLayer had a m_contentsClippingLayer (which
     15        acts as the parent for the content layers) due to the fractional pixel offset.
     16        When GraphicsLayerCA::setContentsVisible(true) was called, it would fail to call
     17        noteSublayersChanged() because the iframe host layer has no m_contentsLayer,
     18        but we do need to rebuild sublayers in this case.
     19
     20        Test: compositing/iframes/content-visibility-with-clipping.html
     21
     22        * platform/graphics/ca/GraphicsLayerCA.cpp:
     23        (WebCore::GraphicsLayerCA::setContentsVisible):
     24
    1252021-01-05  Megan Gardner  <megan_gardner@apple.com>
    226
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r270002 r271191  
    742742    GraphicsLayer::setContentsVisible(contentsVisible);
    743743    noteLayerPropertyChanged(ContentsVisibilityChanged);
     744
    744745    // Visibility affects whether the contentsLayer is parented.
    745     if (m_contentsLayer)
     746    if (m_contentsLayer || m_contentsClippingLayer)
    746747        noteSublayersChanged();
    747748}
Note: See TracChangeset for help on using the changeset viewer.