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

Changeset 245837 in webkit


Ignore:
Timestamp:
May 28, 2019, 6:07:03 PM (7 years ago)
Author:
Simon Fraser
Message:

Use scroll-velocity-based tile coverage for overflow:scroll
https://bugs.webkit.org/show_bug.cgi?id=198294
rdar://problem/48942184

Reviewed by Tim Horton.

Source/WebCore:

Start using a velocity-based tile coverage computation on layers with Type::ScrolledContents,
which is the content layers for overflow:scroll when they get big enough to get tiled.

Move legacy macOS coverage code into adjustTileCoverageForDesktopPageScrolling() because
I don't want to change its behavior in this patch. Use TileController::adjustTileCoverageRectForScrolling()
for iOS and macOS overflow scrolling. Since only iOS page scrolling gets velocity data from the UI
process, compute velocity in TileController using the visible rect top-left.

For overflow scroll, we have to plumb horizontal and vertical coverage in from
RenderLayerBacking.

Tests: tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html

tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html
tiled-drawing/scrolling/overflow/overflow-tile-coverage.html

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::adjustCoverageRect const):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::setVelocity):
(WebCore::TileController::adjustTileCoverageRect):
(WebCore::TileController::adjustTileCoverageForDesktopPageScrolling const):
(WebCore::TileController::adjustTileCoverageWithScrollingVelocity const):
(WebCore::TileController::adjustTileCoverageRectForScrolling):
(WebCore::expandRectWithinRect): Deleted.
(WebCore::TileController::adjustTileCoverageRect const): Deleted.
(WebCore::TileController::adjustTileCoverageRectForScrolling const): Deleted.

  • platform/graphics/ca/TileController.h:
  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::computePageTiledBackingCoverage):
(WebCore::computeOverflowTiledBackingCoverage):
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
(WebCore::RenderLayerBacking::updateGeometry):

LayoutTests:

  • tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt: Added.
  • tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html: Added.
  • tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt: Added.
  • tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html: Added.
  • tiled-drawing/scrolling/overflow/overflow-tile-coverage-expected.txt: Added.
  • tiled-drawing/scrolling/overflow/overflow-tile-coverage.html: Added.
Location:
trunk
Files:
7 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245829 r245837  
     12019-05-28  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Use scroll-velocity-based tile coverage for overflow:scroll
     4        https://bugs.webkit.org/show_bug.cgi?id=198294
     5        rdar://problem/48942184
     6
     7        Reviewed by Tim Horton.
     8
     9        * tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt: Added.
     10        * tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html: Added.
     11        * tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt: Added.
     12        * tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html: Added.
     13        * tiled-drawing/scrolling/overflow/overflow-tile-coverage-expected.txt: Added.
     14        * tiled-drawing/scrolling/overflow/overflow-tile-coverage.html: Added.
     15
    1162019-05-28  Youenn Fablet  <youenn@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r245825 r245837  
     12019-05-28  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Use scroll-velocity-based tile coverage for overflow:scroll
     4        https://bugs.webkit.org/show_bug.cgi?id=198294
     5        rdar://problem/48942184
     6
     7        Reviewed by Tim Horton.
     8
     9        Start using a velocity-based tile coverage computation on layers with Type::ScrolledContents,
     10        which is the content layers for overflow:scroll when they get big enough to get tiled.
     11
     12        Move legacy macOS coverage code into adjustTileCoverageForDesktopPageScrolling() because
     13        I don't want to change its behavior in this patch. Use TileController::adjustTileCoverageRectForScrolling()
     14        for iOS and macOS overflow scrolling. Since only iOS page scrolling gets velocity data from the UI
     15        process, compute velocity in TileController using the visible rect top-left.
     16       
     17        For overflow scroll, we have to plumb horizontal and vertical coverage in from
     18        RenderLayerBacking.
     19
     20        Tests: tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage.html
     21               tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage.html
     22               tiled-drawing/scrolling/overflow/overflow-tile-coverage.html
     23
     24        * platform/graphics/TiledBacking.h:
     25        * platform/graphics/ca/GraphicsLayerCA.cpp:
     26        (WebCore::GraphicsLayerCA::adjustCoverageRect const):
     27        * platform/graphics/ca/PlatformCALayer.h:
     28        * platform/graphics/ca/TileController.cpp:
     29        (WebCore::TileController::setVelocity):
     30        (WebCore::TileController::adjustTileCoverageRect):
     31        (WebCore::TileController::adjustTileCoverageForDesktopPageScrolling const):
     32        (WebCore::TileController::adjustTileCoverageWithScrollingVelocity const):
     33        (WebCore::TileController::adjustTileCoverageRectForScrolling):
     34        (WebCore::expandRectWithinRect): Deleted.
     35        (WebCore::TileController::adjustTileCoverageRect const): Deleted.
     36        (WebCore::TileController::adjustTileCoverageRectForScrolling const): Deleted.
     37        * platform/graphics/ca/TileController.h:
     38        * rendering/RenderLayer.h:
     39        * rendering/RenderLayerBacking.cpp:
     40        (WebCore::computePageTiledBackingCoverage):
     41        (WebCore::computeOverflowTiledBackingCoverage):
     42        (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
     43        (WebCore::RenderLayerBacking::updateGeometry):
     44
    1452019-05-28  Shawn Roberts  <sroberts@apple.com>
    246
  • trunk/Source/WebCore/platform/graphics/TiledBacking.h

    r245794 r245837  
    9696    virtual TileCoverage tileCoverage() const = 0;
    9797
    98     virtual FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) const = 0;
    99     virtual FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) const = 0;
     98    virtual FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) = 0;
     99    virtual FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) = 0;
    100100
    101101    virtual void willStartLiveResize() = 0;
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r245794 r245837  
    14481448        coverageRect = tiledBacking()->adjustTileCoverageRectForScrolling(coverageRect, size(), oldVisibleRect, rects.visibleRect, pageScaleFactor() * deviceScaleFactor());
    14491449        break;
     1450    case Type::ScrolledContents:
     1451        if (m_layer->usesTiledBackingLayer())
     1452            coverageRect = tiledBacking()->adjustTileCoverageRectForScrolling(coverageRect, size(), oldVisibleRect, rects.visibleRect, pageScaleFactor() * deviceScaleFactor());
     1453        break;
    14501454    case Type::Normal:
    1451     case Type::ScrolledContents:
    1452         if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer)
     1455        if (m_layer->usesTiledBackingLayer())
    14531456            coverageRect = tiledBacking()->adjustTileCoverageRect(coverageRect, oldVisibleRect, rects.visibleRect, size() != m_sizeAtLastCoverageRectUpdate);
    14541457        break;
  • trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h

    r243962 r245837  
    100100    bool usesTiledBackingLayer() const { return layerType() == LayerTypePageTiledBackingLayer || layerType() == LayerTypeTiledBackingLayer; }
    101101
     102    bool isPageTiledBackingLayer() const { return layerType() == LayerTypePageTiledBackingLayer; }
     103
    102104    PlatformCALayerClient* owner() const { return m_owner; }
    103105    virtual void setOwner(PlatformCALayerClient* owner) { m_owner = owner; }
  • trunk/Source/WebCore/platform/graphics/ca/TileController.cpp

    r245794 r245837  
    241241{
    242242    bool changeAffectsTileCoverage = m_velocity.velocityOrScaleIsChanging() || velocity.velocityOrScaleIsChanging();
     243
    243244    m_velocity = velocity;
    244    
     245    m_haveExternalVelocityData = true;
     246
    245247    if (changeAffectsTileCoverage)
    246248        setNeedsRevalidateTiles();
     
    361363}
    362364
    363 #if !PLATFORM(IOS_FAMILY)
    364 // Return 'rect' padded evenly on all sides to achieve 'newSize', but make the padding uneven to contain within constrainingRect.
    365 static FloatRect expandRectWithinRect(const FloatRect& rect, const FloatSize& newSize, const FloatRect& constrainingRect)
    366 {
    367     ASSERT(newSize.width() >= rect.width() && newSize.height() >= rect.height());
    368 
    369     FloatSize extraSize = newSize - rect.size();
    370    
    371     FloatRect expandedRect = rect;
    372     expandedRect.inflateX(extraSize.width() / 2);
    373     expandedRect.inflateY(extraSize.height() / 2);
    374 
    375     if (expandedRect.x() < constrainingRect.x())
    376         expandedRect.setX(constrainingRect.x());
    377     else if (expandedRect.maxX() > constrainingRect.maxX())
    378         expandedRect.setX(constrainingRect.maxX() - expandedRect.width());
    379    
    380     if (expandedRect.y() < constrainingRect.y())
    381         expandedRect.setY(constrainingRect.y());
    382     else if (expandedRect.maxY() > constrainingRect.maxY())
    383         expandedRect.setY(constrainingRect.maxY() - expandedRect.height());
    384    
    385     return intersection(expandedRect, constrainingRect);
    386 }
    387 #endif
    388 
    389 FloatRect TileController::adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) const
     365FloatRect TileController::adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged)
    390366{
    391367    // If the old visible rect is empty, we have no information about how the visible area is changing
     
    450426}
    451427
    452 FloatRect TileController::adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect, float contentsScale) const
    453 {
    454     // If the page is not in a window (for example if it's in a background tab), we limit the tile coverage rect to the visible rect.
    455     if (!m_isInWindow)
    456         return visibleRect;
    457 
    458 #if PLATFORM(IOS_FAMILY)
    459     // FIXME: unify the iOS and Mac code.
    460     UNUSED_PARAM(previousVisibleRect);
    461    
     428#if !PLATFORM(IOS_FAMILY)
     429// Coverage expansion for less memory-constrained devices.
     430// Kept separate to preserve historical behavior; should be merged with adjustTileCoverageWithScrollingVelocity eventually.
     431FloatRect TileController::adjustTileCoverageForDesktopPageScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect) const
     432{
     433    // FIXME: look at how far the document can scroll in each dimension.
     434    FloatSize coverageSize = visibleRect.size();
     435
     436    bool largeVisibleRectChange = !previousVisibleRect.isEmpty() && !visibleRect.intersects(previousVisibleRect);
     437
     438    // Inflate the coverage rect so that it covers 2x of the visible width and 3x of the visible height.
     439    // These values were chosen because it's more common to have tall pages and to scroll vertically,
     440    // so we keep more tiles above and below the current area.
     441    float widthScale = 1;
     442    float heightScale = 1;
     443
     444    if (m_tileCoverage & CoverageForHorizontalScrolling && !largeVisibleRectChange)
     445        widthScale = 2;
     446
     447    if (m_tileCoverage & CoverageForVerticalScrolling && !largeVisibleRectChange)
     448        heightScale = 3;
     449
     450    coverageSize.scale(widthScale, heightScale);
     451
     452    FloatRect coverageBounds = boundsForSize(newSize);
     453
     454    // Return 'rect' padded evenly on all sides to achieve 'newSize', but make the padding uneven to contain within constrainingRect.
     455    auto expandRectWithinRect = [](const FloatRect& rect, const FloatSize& newSize, const FloatRect& constrainingRect) {
     456        ASSERT(newSize.width() >= rect.width() && newSize.height() >= rect.height());
     457
     458        FloatSize extraSize = newSize - rect.size();
     459       
     460        FloatRect expandedRect = rect;
     461        expandedRect.inflateX(extraSize.width() / 2);
     462        expandedRect.inflateY(extraSize.height() / 2);
     463
     464        if (expandedRect.x() < constrainingRect.x())
     465            expandedRect.setX(constrainingRect.x());
     466        else if (expandedRect.maxX() > constrainingRect.maxX())
     467            expandedRect.setX(constrainingRect.maxX() - expandedRect.width());
     468       
     469        if (expandedRect.y() < constrainingRect.y())
     470            expandedRect.setY(constrainingRect.y());
     471        else if (expandedRect.maxY() > constrainingRect.maxY())
     472            expandedRect.setY(constrainingRect.maxY() - expandedRect.height());
     473       
     474        return intersection(expandedRect, constrainingRect);
     475    };
     476
     477    FloatRect coverage = expandRectWithinRect(visibleRect, coverageSize, coverageBounds);
     478    LOG_WITH_STREAM(Tiling, stream << "TileController::adjustTileCoverageForDesktopPageScrolling newSize=" << newSize << " mode " << m_tileCoverage << " expanded to " << coverageSize << " bounds with margin " << coverageBounds << " coverage " << coverage);
     479    return unionRect(coverageRect, coverage);
     480}
     481#endif
     482
     483FloatRect TileController::adjustTileCoverageWithScrollingVelocity(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& visibleRect, float contentsScale) const
     484{
    462485    if (m_tileCoverage == CoverageForVisibleArea || MemoryPressureHandler::singleton().isUnderMemoryPressure())
    463486        return visibleRect;
     
    509532        futureRect.setY(0);
    510533
    511     LOG_WITH_STREAM(Tiling, stream << "TileController " << this << " computeTileCoverageRect - coverage " << coverageRect << " expanded to " << unionRect(coverageRect, futureRect) << " velocity " << m_velocity);
     534    LOG_WITH_STREAM(Tiling, stream << "TileController " << this << " adjustTileCoverageForScrolling - coverage " << coverageRect << " expanded to " << unionRect(coverageRect, futureRect) << " velocity " << m_velocity);
    512535
    513536    return unionRect(coverageRect, futureRect);
     537}
     538
     539FloatRect TileController::adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect, float contentsScale)
     540{
     541    // If the page is not in a window (for example if it's in a background tab), we limit the tile coverage rect to the visible rect.
     542    if (!m_isInWindow)
     543        return visibleRect;
     544
     545#if !PLATFORM(IOS_FAMILY)
     546    if (m_tileCacheLayer->isPageTiledBackingLayer())
     547        return adjustTileCoverageForDesktopPageScrolling(coverageRect, newSize, previousVisibleRect, visibleRect);
    514548#else
    515     UNUSED_PARAM(contentsScale);
    516 
    517     // FIXME: look at how far the document can scroll in each dimension.
    518     FloatSize coverageSize = visibleRect.size();
    519 
    520     bool largeVisibleRectChange = !previousVisibleRect.isEmpty() && !visibleRect.intersects(previousVisibleRect);
    521 
    522     // Inflate the coverage rect so that it covers 2x of the visible width and 3x of the visible height.
    523     // These values were chosen because it's more common to have tall pages and to scroll vertically,
    524     // so we keep more tiles above and below the current area.
    525     float widthScale = 1;
    526     float heightScale = 1;
    527 
    528     if (m_tileCoverage & CoverageForHorizontalScrolling && !largeVisibleRectChange)
    529         widthScale = 2;
    530 
    531     if (m_tileCoverage & CoverageForVerticalScrolling && !largeVisibleRectChange)
    532         heightScale = 3;
     549    UNUSED_PARAM(previousVisibleRect);
     550#endif
     551
     552    auto computeVelocityIfNecessary = [&](FloatPoint scrollOffset) {
     553        if (m_haveExternalVelocityData)
     554            return;
     555
     556        if (!m_historicalVelocityData)
     557            m_historicalVelocityData = std::make_unique<HistoricalVelocityData>();
     558
     559        m_velocity = m_historicalVelocityData->velocityForNewData(scrollOffset, contentsScale, MonotonicTime::now());
     560    };
    533561   
    534     coverageSize.scale(widthScale, heightScale);
    535 
    536     FloatRect coverageBounds = boundsForSize(newSize);
    537    
    538     FloatRect coverage = expandRectWithinRect(visibleRect, coverageSize, coverageBounds);
    539     LOG_WITH_STREAM(Tiling, stream << "TileController::computeTileCoverageRect newSize=" << newSize << " mode " << m_tileCoverage << " expanded to " << coverageSize << " bounds with margin " << coverageBounds << " coverage " << coverage);
    540     return unionRect(coverageRect, coverage);
    541 #endif
     562    computeVelocityIfNecessary(visibleRect.location());
     563
     564    return adjustTileCoverageWithScrollingVelocity(coverageRect, newSize, visibleRect, contentsScale);
    542565}
    543566
  • trunk/Source/WebCore/platform/graphics/ca/TileController.h

    r245794 r245837  
    123123    TileCoverage tileCoverage() const final { return m_tileCoverage; }
    124124
    125     FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) const final;
    126     FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) const final;
     125    FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) final;
     126    FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) final;
    127127
    128128    bool scrollingPerformanceLoggingEnabled() const final { return m_scrollingPerformanceLoggingEnabled; }
     
    191191    void notePendingTileSizeChange();
    192192    void tileSizeChangeTimerFired();
    193    
     193
     194#if !PLATFORM(IOS_FAMILY)
     195    FloatRect adjustTileCoverageForDesktopPageScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect) const;
     196#endif
     197
     198    FloatRect adjustTileCoverageWithScrollingVelocity(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& visibleRect, float contentsScale) const;
     199
    194200    IntRect boundsForSize(const FloatSize&) const;
    195201
     
    205211    std::unique_ptr<TileGrid> m_tileGrid;
    206212    std::unique_ptr<TileGrid> m_zoomedOutTileGrid;
     213
     214    std::unique_ptr<HistoricalVelocityData> m_historicalVelocityData; // Used when we track velocity internally.
    207215
    208216    FloatRect m_visibleRect; // Only used for scroll performance logging.
     
    215223
    216224    TileCoverage m_tileCoverage { CoverageForVisibleArea };
    217    
     225
    218226    VelocityData m_velocity;
    219227
     
    237245    bool m_inLiveResize { false };
    238246    bool m_tileSizeLocked { false };
     247    bool m_haveExternalVelocityData { false };
    239248    bool m_isTileSizeUpdateDelayDisabledForTesting { false };
    240249
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r245490 r245837  
    451451
    452452    bool scrollsOverflow() const;
     453    bool hasScrollableHorizontalOverflow() const;
     454    bool hasScrollableVerticalOverflow() const;
    453455    bool hasScrollbars() const { return m_hBar || m_vBar; }
    454456    void setHasHorizontalScrollbar(bool);
     
    10671069    bool hasHorizontalOverflow() const;
    10681070    bool hasVerticalOverflow() const;
    1069     bool hasScrollableHorizontalOverflow() const;
    1070     bool hasScrollableVerticalOverflow() const;
    10711071
    10721072    bool showsOverflowControls() const;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r245786 r245837  
    356356}
    357357
    358 static TiledBacking::TileCoverage computePageTiledBackingCoverage(RenderLayerBacking* backing)
    359 {
    360     // FIXME: When we use TiledBacking for overflow, this should look at RenderView scrollability.
    361     auto& frameView = backing->owningLayer().renderer().view().frameView();
    362 
     358static TiledBacking::TileCoverage computePageTiledBackingCoverage(const RenderLayer& layer)
     359{
    363360    // If the page is non-visible, don't incur the cost of keeping extra tiles for scrolling.
    364     if (!backing->owningLayer().page().isVisible())
     361    if (!layer.page().isVisible())
    365362        return TiledBacking::CoverageForVisibleArea;
     363
     364    auto& frameView = layer.renderer().view().frameView();
    366365
    367366    TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea;
     
    378377}
    379378
     379static TiledBacking::TileCoverage computeOverflowTiledBackingCoverage(const RenderLayer& layer)
     380{
     381    // If the page is non-visible, don't incur the cost of keeping extra tiles for scrolling.
     382    if (!layer.page().isVisible())
     383        return TiledBacking::CoverageForVisibleArea;
     384   
     385    auto& frameView = layer.renderer().view().frameView();
     386
     387    TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea;
     388    bool useMinimalTilesDuringLiveResize = frameView.inLiveResize();
     389    if (!useMinimalTilesDuringLiveResize) {
     390        if (layer.hasScrollableHorizontalOverflow())
     391            tileCoverage |= TiledBacking::CoverageForHorizontalScrolling;
     392
     393        if (layer.hasScrollableVerticalOverflow())
     394            tileCoverage |= TiledBacking::CoverageForVerticalScrolling;
     395    }
     396    return tileCoverage;
     397}
     398
    380399void RenderLayerBacking::adjustTiledBackingCoverage()
    381400{
    382     if (!m_isFrameLayerWithTiledBacking)
    383         return;
    384 
    385     TiledBacking::TileCoverage tileCoverage = computePageTiledBackingCoverage(this);
    386     tiledBacking()->setTileCoverage(tileCoverage);
     401    if (m_isFrameLayerWithTiledBacking) {
     402        auto tileCoverage = computePageTiledBackingCoverage(m_owningLayer);
     403        tiledBacking()->setTileCoverage(tileCoverage);
     404    }
     405
     406    if (m_owningLayer.hasCompositedScrollableOverflow() && m_scrolledContentsLayer) {
     407        if (auto* tiledBacking = m_scrolledContentsLayer->tiledBacking()) {
     408            auto tileCoverage = computeOverflowTiledBackingCoverage(m_owningLayer);
     409            tiledBacking->setTileCoverage(tileCoverage);
     410        }
     411    }
    387412}
    388413
     
    12591284            m_foregroundLayer->setOffsetFromRenderer(m_scrolledContentsLayer->offsetFromRenderer() - toLayoutSize(m_scrolledContentsLayer->scrollOffset()));
    12601285        }
     1286       
     1287        adjustTiledBackingCoverage();
    12611288    }
    12621289
Note: See TracChangeset for help on using the changeset viewer.