WebKit Bugzilla
Attachment 370746 Details for
Bug 198294
: Use scroll-velocity-based tile coverage for overflow:scroll
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198294-20190528085038.patch (text/plain), 22.82 KB, created by
Simon Fraser (smfr)
on 2019-05-28 08:50:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-28 08:50:39 PDT
Size:
22.82 KB
patch
obsolete
>Subversion Revision: 245794 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 62a3eec84f12f9652f2302923b1543662843d620..8d8879355aff2ee75032ca44f9029c4e630be785 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,34 @@ >+2019-05-28 Simon Fraser <simon.fraser@apple.com> >+ >+ Use scroll-velocity-based tile coverage for overflow:scroll >+ https://bugs.webkit.org/show_bug.cgi?id=198294 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * platform/graphics/TiledBacking.h: >+ * platform/graphics/ca/GraphicsLayerCA.cpp: >+ (WebCore::GraphicsLayerCA::adjustCoverageRect const): >+ (WebCore::GraphicsLayerCA::updateMasksToBounds): >+ * 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): >+ > 2019-05-26 Simon Fraser <simon.fraser@apple.com> > > Move GraphicsLayerCA::adjustTiledLayerVisibleRect() to TileController >diff --git a/Source/WebCore/platform/graphics/TiledBacking.h b/Source/WebCore/platform/graphics/TiledBacking.h >index f22a6fcc506b50b63a6f1f32e8c76df98ec373bb..608798533914e4044f7b02afef86167e4006aaa7 100644 >--- a/Source/WebCore/platform/graphics/TiledBacking.h >+++ b/Source/WebCore/platform/graphics/TiledBacking.h >@@ -95,8 +95,8 @@ public: > virtual void setTileCoverage(TileCoverage) = 0; > virtual TileCoverage tileCoverage() const = 0; > >- virtual FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) const = 0; >- virtual FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) const = 0; >+ virtual FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) = 0; >+ virtual FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) = 0; > > virtual void willStartLiveResize() = 0; > virtual void didEndLiveResize() = 0; >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >index 18ed2e7e59f7eb0017bb818caf86b9ed79e4a7d9..3ae03a9026046aa3327f1e1bbe4bbe3ca4252642 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >@@ -1447,9 +1447,12 @@ bool GraphicsLayerCA::adjustCoverageRect(VisibleAndCoverageRects& rects, const F > case Type::PageTiledBacking: > coverageRect = tiledBacking()->adjustTileCoverageRectForScrolling(coverageRect, size(), oldVisibleRect, rects.visibleRect, pageScaleFactor() * deviceScaleFactor()); > break; >- case Type::Normal: > case Type::ScrolledContents: >- if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer) >+ if (m_layer->usesTiledBackingLayer()) >+ coverageRect = tiledBacking()->adjustTileCoverageRectForScrolling(coverageRect, size(), oldVisibleRect, rects.visibleRect, pageScaleFactor() * deviceScaleFactor()); >+ break; >+ case Type::Normal: >+ if (m_layer->usesTiledBackingLayer()) > coverageRect = tiledBacking()->adjustTileCoverageRect(coverageRect, oldVisibleRect, rects.visibleRect, size() != m_sizeAtLastCoverageRectUpdate); > break; > default: >@@ -2077,12 +2080,12 @@ void GraphicsLayerCA::updateChildrenTransform() > > void GraphicsLayerCA::updateMasksToBounds() > { >- m_layer->setMasksToBounds(m_masksToBounds); >- >- if (m_layerClones) { >- for (auto& layer : m_layerClones->primaryLayerClones.values()) >- layer->setMasksToBounds(m_masksToBounds); >- } >+// m_layer->setMasksToBounds(m_masksToBounds); >+// >+// if (m_layerClones) { >+// for (auto& layer : m_layerClones->primaryLayerClones.values()) >+// layer->setMasksToBounds(m_masksToBounds); >+// } > } > > void GraphicsLayerCA::updateContentsVisibility() >diff --git a/Source/WebCore/platform/graphics/ca/PlatformCALayer.h b/Source/WebCore/platform/graphics/ca/PlatformCALayer.h >index 39b9294c17f91dda2895217fccf59ee9fa4426d2..f19768a2a395b9172f5ca5466032de46cb1a796c 100644 >--- a/Source/WebCore/platform/graphics/ca/PlatformCALayer.h >+++ b/Source/WebCore/platform/graphics/ca/PlatformCALayer.h >@@ -99,6 +99,8 @@ public: > > bool usesTiledBackingLayer() const { return layerType() == LayerTypePageTiledBackingLayer || layerType() == LayerTypeTiledBackingLayer; } > >+ bool isPageTiledBackingLayer() const { return layerType() == LayerTypePageTiledBackingLayer; } >+ > PlatformCALayerClient* owner() const { return m_owner; } > virtual void setOwner(PlatformCALayerClient* owner) { m_owner = owner; } > >diff --git a/Source/WebCore/platform/graphics/ca/TileController.cpp b/Source/WebCore/platform/graphics/ca/TileController.cpp >index 4aff10172ddde088c6c759972101647773093ced..abb69a663194446b765422b02f25c00fc8a7022c 100644 >--- a/Source/WebCore/platform/graphics/ca/TileController.cpp >+++ b/Source/WebCore/platform/graphics/ca/TileController.cpp >@@ -240,8 +240,10 @@ bool TileController::tilesWouldChangeForCoverageRect(const FloatRect& rect) cons > void TileController::setVelocity(const VelocityData& velocity) > { > bool changeAffectsTileCoverage = m_velocity.velocityOrScaleIsChanging() || velocity.velocityOrScaleIsChanging(); >+ > m_velocity = velocity; >- >+ m_haveExternalVelocityData = true; >+ > if (changeAffectsTileCoverage) > setNeedsRevalidateTiles(); > } >@@ -360,33 +362,7 @@ IntRect TileController::boundsAtLastRevalidateWithoutMargin() const > return boundsWithoutMargin; > } > >-#if !PLATFORM(IOS_FAMILY) >-// Return 'rect' padded evenly on all sides to achieve 'newSize', but make the padding uneven to contain within constrainingRect. >-static FloatRect expandRectWithinRect(const FloatRect& rect, const FloatSize& newSize, const FloatRect& constrainingRect) >-{ >- ASSERT(newSize.width() >= rect.width() && newSize.height() >= rect.height()); >- >- FloatSize extraSize = newSize - rect.size(); >- >- FloatRect expandedRect = rect; >- expandedRect.inflateX(extraSize.width() / 2); >- expandedRect.inflateY(extraSize.height() / 2); >- >- if (expandedRect.x() < constrainingRect.x()) >- expandedRect.setX(constrainingRect.x()); >- else if (expandedRect.maxX() > constrainingRect.maxX()) >- expandedRect.setX(constrainingRect.maxX() - expandedRect.width()); >- >- if (expandedRect.y() < constrainingRect.y()) >- expandedRect.setY(constrainingRect.y()); >- else if (expandedRect.maxY() > constrainingRect.maxY()) >- expandedRect.setY(constrainingRect.maxY() - expandedRect.height()); >- >- return intersection(expandedRect, constrainingRect); >-} >-#endif >- >-FloatRect TileController::adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) const >+FloatRect TileController::adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) > { > // If the old visible rect is empty, we have no information about how the visible area is changing > // (maybe the layer was just created), so don't attempt to expand. Also don't attempt to expand >@@ -449,14 +425,63 @@ FloatRect TileController::adjustTileCoverageRect(const FloatRect& coverageRect, > return unionRect(coverageRect, expandedRect); > } > >-FloatRect TileController::adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect, float contentsScale) const >+#if !PLATFORM(IOS_FAMILY) >+// Coverage expansion for less memory-constrained devices. >+// Kept separate to preserve historical behavior; should be merged with adjustTileCoverageWithScrollingVelocity eventually. >+FloatRect TileController::adjustTileCoverageForDesktopPageScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect) const > { >- // 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. >- if (!m_isInWindow) >- return visibleRect; >+ // FIXME: look at how far the document can scroll in each dimension. >+ FloatSize coverageSize = visibleRect.size(); > >-#if PLATFORM(IOS_FAMILY) >- // FIXME: unify the iOS and Mac code. >+ bool largeVisibleRectChange = !previousVisibleRect.isEmpty() && !visibleRect.intersects(previousVisibleRect); >+ >+ // Inflate the coverage rect so that it covers 2x of the visible width and 3x of the visible height. >+ // These values were chosen because it's more common to have tall pages and to scroll vertically, >+ // so we keep more tiles above and below the current area. >+ float widthScale = 1; >+ float heightScale = 1; >+ >+ if (m_tileCoverage & CoverageForHorizontalScrolling && !largeVisibleRectChange) >+ widthScale = 2; >+ >+ if (m_tileCoverage & CoverageForVerticalScrolling && !largeVisibleRectChange) >+ heightScale = 3; >+ >+ coverageSize.scale(widthScale, heightScale); >+ >+ FloatRect coverageBounds = boundsForSize(newSize); >+ >+ // Return 'rect' padded evenly on all sides to achieve 'newSize', but make the padding uneven to contain within constrainingRect. >+ auto expandRectWithinRect = [](const FloatRect& rect, const FloatSize& newSize, const FloatRect& constrainingRect) { >+ ASSERT(newSize.width() >= rect.width() && newSize.height() >= rect.height()); >+ >+ FloatSize extraSize = newSize - rect.size(); >+ >+ FloatRect expandedRect = rect; >+ expandedRect.inflateX(extraSize.width() / 2); >+ expandedRect.inflateY(extraSize.height() / 2); >+ >+ if (expandedRect.x() < constrainingRect.x()) >+ expandedRect.setX(constrainingRect.x()); >+ else if (expandedRect.maxX() > constrainingRect.maxX()) >+ expandedRect.setX(constrainingRect.maxX() - expandedRect.width()); >+ >+ if (expandedRect.y() < constrainingRect.y()) >+ expandedRect.setY(constrainingRect.y()); >+ else if (expandedRect.maxY() > constrainingRect.maxY()) >+ expandedRect.setY(constrainingRect.maxY() - expandedRect.height()); >+ >+ return intersection(expandedRect, constrainingRect); >+ }; >+ >+ FloatRect coverage = expandRectWithinRect(visibleRect, coverageSize, coverageBounds); >+ LOG_WITH_STREAM(Tiling, stream << "TileController::adjustTileCoverageForDesktopPageScrolling newSize=" << newSize << " mode " << m_tileCoverage << " expanded to " << coverageSize << " bounds with margin " << coverageBounds << " coverage " << coverage); >+ return unionRect(coverageRect, coverage); >+} >+#endif >+ >+FloatRect TileController::adjustTileCoverageWithScrollingVelocity(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect, float contentsScale) const >+{ > UNUSED_PARAM(previousVisibleRect); > > if (m_tileCoverage == CoverageForVisibleArea || MemoryPressureHandler::singleton().isUnderMemoryPressure()) >@@ -508,37 +533,35 @@ FloatRect TileController::adjustTileCoverageRectForScrolling(const FloatRect& co > if (futureRect.y() < 0) > futureRect.setY(0); > >- LOG_WITH_STREAM(Tiling, stream << "TileController " << this << " computeTileCoverageRect - coverage " << coverageRect << " expanded to " << unionRect(coverageRect, futureRect) << " velocity " << m_velocity); >+ LOG_WITH_STREAM(Tiling, stream << "TileController " << this << " adjustTileCoverageForScrolling - coverage " << coverageRect << " expanded to " << unionRect(coverageRect, futureRect) << " velocity " << m_velocity); > > return unionRect(coverageRect, futureRect); >-#else >- UNUSED_PARAM(contentsScale); >+} > >- // FIXME: look at how far the document can scroll in each dimension. >- FloatSize coverageSize = visibleRect.size(); >+FloatRect TileController::adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect, float contentsScale) >+{ >+ // 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. >+ if (!m_isInWindow) >+ return visibleRect; > >- bool largeVisibleRectChange = !previousVisibleRect.isEmpty() && !visibleRect.intersects(previousVisibleRect); >+#if !PLATFORM(IOS_FAMILY) >+ if (m_tileCacheLayer->isPageTiledBackingLayer()) >+ return adjustTileCoverageForDesktopPageScrolling(coverageRect, newSize, previousVisibleRect, visibleRect);; >+#endif > >- // Inflate the coverage rect so that it covers 2x of the visible width and 3x of the visible height. >- // These values were chosen because it's more common to have tall pages and to scroll vertically, >- // so we keep more tiles above and below the current area. >- float widthScale = 1; >- float heightScale = 1; >+ auto computeVelocityIfNecessary = [&](FloatPoint scrollOffset) { >+ if (m_haveExternalVelocityData) >+ return; > >- if (m_tileCoverage & CoverageForHorizontalScrolling && !largeVisibleRectChange) >- widthScale = 2; >+ if (!m_historicalVelocityData) >+ m_historicalVelocityData = std::make_unique<HistoricalVelocityData>(); > >- if (m_tileCoverage & CoverageForVerticalScrolling && !largeVisibleRectChange) >- heightScale = 3; >+ m_velocity = m_historicalVelocityData->velocityForNewData(scrollOffset, contentsScale, MonotonicTime::now()); >+ }; > >- coverageSize.scale(widthScale, heightScale); >+ computeVelocityIfNecessary(visibleRect.location()); > >- FloatRect coverageBounds = boundsForSize(newSize); >- >- FloatRect coverage = expandRectWithinRect(visibleRect, coverageSize, coverageBounds); >- LOG_WITH_STREAM(Tiling, stream << "TileController::computeTileCoverageRect newSize=" << newSize << " mode " << m_tileCoverage << " expanded to " << coverageSize << " bounds with margin " << coverageBounds << " coverage " << coverage); >- return unionRect(coverageRect, coverage); >-#endif >+ return adjustTileCoverageWithScrollingVelocity(coverageRect, newSize, previousVisibleRect, visibleRect, contentsScale); > } > > void TileController::scheduleTileRevalidation(Seconds interval) >diff --git a/Source/WebCore/platform/graphics/ca/TileController.h b/Source/WebCore/platform/graphics/ca/TileController.h >index 8dfc432ac67f9f8174439a5d1100ebcf6a63c3c8..a627a37cb8249c010843610f47f0527f0bb29b89 100644 >--- a/Source/WebCore/platform/graphics/ca/TileController.h >+++ b/Source/WebCore/platform/graphics/ca/TileController.h >@@ -122,8 +122,8 @@ public: > int rightMarginWidth() const final; > TileCoverage tileCoverage() const final { return m_tileCoverage; } > >- FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) const final; >- FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) const final; >+ FloatRect adjustTileCoverageRect(const FloatRect& coverageRect, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, bool sizeChanged) final; >+ FloatRect adjustTileCoverageRectForScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect, float contentsScale) final; > > bool scrollingPerformanceLoggingEnabled() const final { return m_scrollingPerformanceLoggingEnabled; } > >@@ -190,7 +190,13 @@ private: > > void notePendingTileSizeChange(); > void tileSizeChangeTimerFired(); >- >+ >+#if !PLATFORM(IOS_FAMILY) >+ FloatRect adjustTileCoverageForDesktopPageScrolling(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect) const; >+#endif >+ >+ FloatRect adjustTileCoverageWithScrollingVelocity(const FloatRect& coverageRect, const FloatSize& newSize, const FloatRect& previousVisibleRect, const FloatRect& visibleRect, float contentsScale) const; >+ > IntRect boundsForSize(const FloatSize&) const; > > PlatformCALayerClient* owningGraphicsLayer() const { return m_tileCacheLayer->owner(); } >@@ -205,6 +211,8 @@ private: > std::unique_ptr<TileGrid> m_tileGrid; > std::unique_ptr<TileGrid> m_zoomedOutTileGrid; > >+ std::unique_ptr<HistoricalVelocityData> m_historicalVelocityData; // Used when we track velocity internally. >+ > FloatRect m_visibleRect; // Only used for scroll performance logging. > Optional<FloatRect> m_layoutViewportRect; // Only used by the tiled scrolling indicator. > FloatRect m_coverageRect; >@@ -214,7 +222,7 @@ private: > DeferrableOneShotTimer m_tileSizeChangeTimer; > > TileCoverage m_tileCoverage { CoverageForVisibleArea }; >- >+ > VelocityData m_velocity; > > int m_marginSize { kDefaultTileSize }; >@@ -236,6 +244,7 @@ private: > bool m_hasTilesWithTemporaryScaleFactor { false }; // Used to make low-res tiles when zooming. > bool m_inLiveResize { false }; > bool m_tileSizeLocked { false }; >+ bool m_haveExternalVelocityData { false }; > bool m_isTileSizeUpdateDelayDisabledForTesting { false }; > > Color m_tileDebugBorderColor; >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index 6ddc70db3e9abdfe057ed40affe6a4d4ec9524dc..5e07bc775f22be480fde242c58c78da46373a32d 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -450,6 +450,8 @@ public: > void scrollRectToVisible(const LayoutRect& absoluteRect, bool insideFixed, const ScrollRectToVisibleOptions&); > > bool scrollsOverflow() const; >+ bool hasScrollableHorizontalOverflow() const; >+ bool hasScrollableVerticalOverflow() const; > bool hasScrollbars() const { return m_hBar || m_vBar; } > void setHasHorizontalScrollbar(bool); > void setHasVerticalScrollbar(bool); >@@ -1066,8 +1068,6 @@ private: > void computeScrollDimensions(); > bool hasHorizontalOverflow() const; > bool hasVerticalOverflow() const; >- bool hasScrollableHorizontalOverflow() const; >- bool hasScrollableVerticalOverflow() const; > > bool showsOverflowControls() const; > >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index 4b46e8cb0d76a055e9138837e01e813d3c9001dd..871b29d394e0e22e54a79e9dae9a933fa64bf4a9 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -355,13 +355,13 @@ TiledBacking* RenderLayerBacking::tiledBacking() const > return m_graphicsLayer->tiledBacking(); > } > >-static TiledBacking::TileCoverage computePageTiledBackingCoverage(RenderLayerBacking* backing) >+static TiledBacking::TileCoverage computePageTiledBackingCoverage(const RenderLayer& layer) > { > // FIXME: When we use TiledBacking for overflow, this should look at RenderView scrollability. >- auto& frameView = backing->owningLayer().renderer().view().frameView(); >+ auto& frameView = layer.renderer().view().frameView(); > > // If the page is non-visible, don't incur the cost of keeping extra tiles for scrolling. >- if (!backing->owningLayer().page().isVisible()) >+ if (!layer.page().isVisible()) > return TiledBacking::CoverageForVisibleArea; > > TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea; >@@ -377,13 +377,41 @@ static TiledBacking::TileCoverage computePageTiledBackingCoverage(RenderLayerBac > return tileCoverage; > } > >+static TiledBacking::TileCoverage computeOverflowTiledBackingCoverage(const RenderLayer& layer) >+{ >+ // If the page is non-visible, don't incur the cost of keeping extra tiles for scrolling. >+ if (!layer.page().isVisible()) >+ return TiledBacking::CoverageForVisibleArea; >+ >+ // FIXME: do something about overflows that have never been scrolled. >+ >+ auto& frameView = layer.renderer().view().frameView(); >+ >+ TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea; >+ bool useMinimalTilesDuringLiveResize = frameView.inLiveResize(); >+ if (!useMinimalTilesDuringLiveResize) { >+ if (layer.hasScrollableHorizontalOverflow()) >+ tileCoverage |= TiledBacking::CoverageForHorizontalScrolling; >+ >+ if (layer.hasScrollableVerticalOverflow()) >+ tileCoverage |= TiledBacking::CoverageForVerticalScrolling; >+ } >+ return tileCoverage; >+} >+ > void RenderLayerBacking::adjustTiledBackingCoverage() > { >- if (!m_isFrameLayerWithTiledBacking) >- return; >+ if (m_isFrameLayerWithTiledBacking) { >+ auto tileCoverage = computePageTiledBackingCoverage(m_owningLayer); >+ tiledBacking()->setTileCoverage(tileCoverage); >+ } > >- TiledBacking::TileCoverage tileCoverage = computePageTiledBackingCoverage(this); >- tiledBacking()->setTileCoverage(tileCoverage); >+ if (m_owningLayer.hasCompositedScrollableOverflow() && m_scrolledContentsLayer) { >+ if (auto* tiledBacking = m_scrolledContentsLayer->tiledBacking()) { >+ auto tileCoverage = computeOverflowTiledBackingCoverage(m_owningLayer); >+ tiledBacking->setTileCoverage(tileCoverage); >+ } >+ } > } > > void RenderLayerBacking::setTiledBackingHasMargins(bool hasExtendedBackgroundOnLeftAndRight, bool hasExtendedBackgroundOnTopAndBottom) >@@ -1258,6 +1286,8 @@ void RenderLayerBacking::updateGeometry() > m_foregroundLayer->setSize(m_scrolledContentsLayer->size()); > m_foregroundLayer->setOffsetFromRenderer(m_scrolledContentsLayer->offsetFromRenderer() - toLayoutSize(m_scrolledContentsLayer->scrollOffset())); > } >+ >+ adjustTiledBackingCoverage(); > } > > // If this layer was created just for clipping or to apply perspective, it doesn't need its own backing store.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198294
:
370746
|
370753
|
370757
|
370762
|
370763
|
370766
|
370788