Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (224109 => 224110)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-10-27 10:27:36 UTC (rev 224109)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-10-27 14:38:41 UTC (rev 224110)
@@ -79,7 +79,7 @@
ASSERT(renderer.isCanvas());
const HTMLCanvasElement* canvas = downcast<HTMLCanvasElement>(renderer.node());
- CanvasRenderingContext* context = canvas->renderingContext();
+ auto* context = canvas->renderingContext();
if (!context || !context->isAccelerated())
return UnacceleratedCanvas;
@@ -215,7 +215,7 @@
createPrimaryGraphicsLayer();
- if (TiledBacking* tiledBacking = this->tiledBacking()) {
+ if (auto* tiledBacking = this->tiledBacking()) {
tiledBacking->setIsInWindow(renderer().page().isInWindow());
if (m_isFrameLayerWithTiledBacking) {
@@ -300,7 +300,7 @@
static TiledBacking::TileCoverage computePageTiledBackingCoverage(RenderLayerBacking* backing)
{
// FIXME: When we use TiledBacking for overflow, this should look at RenderView scrollability.
- FrameView& frameView = backing->owningLayer().renderer().view().frameView();
+ auto& frameView = backing->owningLayer().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())
@@ -426,9 +426,9 @@
#if PLATFORM(IOS)
void RenderLayerBacking::layerWillBeDestroyed()
{
- RenderObject& renderer = this->renderer();
+ auto& renderer = this->renderer();
if (is<RenderEmbeddedObject>(renderer) && downcast<RenderEmbeddedObject>(renderer).allowsAcceleratedCompositing()) {
- PluginViewBase* pluginViewBase = downcast<PluginViewBase>(downcast<RenderWidget>(renderer).widget());
+ auto* pluginViewBase = downcast<PluginViewBase>(downcast<RenderWidget>(renderer).widget());
if (pluginViewBase && m_graphicsLayer->contentsLayerForMedia())
pluginViewBase->detachPluginLayer();
}
@@ -508,7 +508,7 @@
if (!is<RenderBox>(renderer()))
return;
- RenderBox& renderer = downcast<RenderBox>(this->renderer());
+ auto& renderer = downcast<RenderBox>(this->renderer());
LayoutRect boxRect = renderer.borderBoxRect();
if (renderer.hasClip())
boxRect.intersect(renderer.clipRect(LayoutPoint(), nullptr));
@@ -549,7 +549,7 @@
static bool layerOrAncestorIsTransformedOrUsingCompositedScrolling(RenderLayer& layer)
{
- for (RenderLayer* curr = &layer; curr; curr = curr->parent()) {
+ for (auto* curr = &layer; curr; curr = curr->parent()) {
if (curr->hasTransform() || curr->usesAcceleratedScrolling())
return true;
}
@@ -588,8 +588,8 @@
// If this or an ancestor is transformed, we can't currently compute the correct rect to intersect with.
// We'd need RenderObject::convertContainerToLocalQuad(), which doesn't yet exist.
if (shouldClipCompositedBounds()) {
- RenderView& view = renderer().view();
- RenderLayer* rootLayer = view.layer();
+ auto& view = renderer().view();
+ auto* rootLayer = view.layer();
LayoutRect clippingBounds;
if (renderer().style().position() == FixedPosition && renderer().container() == &view)
@@ -623,7 +623,7 @@
{
if (!is<RenderWidget>(renderer()))
return;
- if (RenderLayerCompositor* innerCompositor = RenderLayerCompositor::frameContentsCompositor(&downcast<RenderWidget>(renderer()))) {
+ if (auto* innerCompositor = RenderLayerCompositor::frameContentsCompositor(&downcast<RenderWidget>(renderer()))) {
innerCompositor->frameViewDidChangeSize();
innerCompositor->frameViewDidChangeLocation(flooredIntPoint(contentsBox().location()));
}
@@ -647,7 +647,7 @@
if (flags & IsUpdateRoot) {
updateGeometry();
compositor().updateRootLayerPosition();
- RenderLayer* stackingContainer = m_owningLayer.enclosingStackingContainer();
+ auto* stackingContainer = m_owningLayer.enclosingStackingContainer();
if (!compositor().compositingLayersNeedRebuild() && stackingContainer && (stackingContainer != &m_owningLayer))
compositor().updateCompositingDescendantGeometry(*stackingContainer, *stackingContainer, flags & CompositingChildrenOnly);
}
@@ -697,7 +697,7 @@
if (layerConfigChanged)
updateInternalHierarchy();
- if (GraphicsLayer* flatteningLayer = tileCacheFlatteningLayer()) {
+ if (auto* flatteningLayer = tileCacheFlatteningLayer()) {
if (layerConfigChanged || flatteningLayer->parent() != m_graphicsLayer.get())
m_graphicsLayer->addChild(flatteningLayer);
}
@@ -708,7 +708,7 @@
if (m_owningLayer.hasReflection()) {
if (m_owningLayer.reflectionLayer()->backing()) {
- GraphicsLayer* reflectionLayer = m_owningLayer.reflectionLayer()->backing()->graphicsLayer();
+ auto* reflectionLayer = m_owningLayer.reflectionLayer()->backing()->graphicsLayer();
m_graphicsLayer->setReplicatedByLayer(reflectionLayer);
}
} else
@@ -726,7 +726,7 @@
updateImageContents(contentsInfo);
if (is<RenderEmbeddedObject>(renderer()) && downcast<RenderEmbeddedObject>(renderer()).allowsAcceleratedCompositing()) {
- PluginViewBase* pluginViewBase = downcast<PluginViewBase>(downcast<RenderWidget>(renderer()).widget());
+ auto* pluginViewBase = downcast<PluginViewBase>(downcast<RenderWidget>(renderer()).widget());
#if PLATFORM(IOS)
if (pluginViewBase && !m_graphicsLayer->contentsLayerForMedia()) {
pluginViewBase->detachPluginLayer();
@@ -739,7 +739,7 @@
}
#if ENABLE(VIDEO)
else if (is<RenderVideo>(renderer()) && downcast<RenderVideo>(renderer()).shouldDisplayVideo()) {
- HTMLMediaElement* mediaElement = downcast<HTMLMediaElement>(renderer().element());
+ auto* mediaElement = downcast<HTMLMediaElement>(renderer().element());
m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer(), GraphicsLayer::ContentsLayerForMedia);
}
#endif
@@ -746,7 +746,7 @@
#if ENABLE(WEBGL) || ENABLE(ACCELERATED_2D_CANVAS)
else if (renderer().isCanvas() && canvasCompositingStrategy(renderer()) == CanvasAsLayerContents) {
const HTMLCanvasElement* canvas = downcast<HTMLCanvasElement>(renderer().element());
- if (CanvasRenderingContext* context = canvas->renderingContext())
+ if (auto* context = canvas->renderingContext())
m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer(), GraphicsLayer::ContentsLayerForCanvas);
layerConfigChanged = true;
}
@@ -856,7 +856,7 @@
LayoutSize fromAncestorGraphicsLayer()
{
if (!m_fromAncestorGraphicsLayer) {
- RenderLayer* compositedAncestor = m_renderLayer.ancestorCompositingLayer();
+ auto* compositedAncestor = m_renderLayer.ancestorCompositingLayer();
LayoutPoint localPointInAncestorRenderLayerCoords = m_renderLayer.convertToLayerCoords(compositedAncestor, m_location, RenderLayer::AdjustForColumns);
m_fromAncestorGraphicsLayer = computeOffsetFromAncestorGraphicsLayer(compositedAncestor, localPointInAncestorRenderLayerCoords, m_deviceScaleFactor);
}
@@ -972,7 +972,7 @@
m_graphicsLayer->setPreserves3D(preserves3D);
m_graphicsLayer->setBackfaceVisibility(style.backfaceVisibility() == BackfaceVisibilityVisible);
- RenderLayer* compositedAncestor = m_owningLayer.ancestorCompositingLayer();
+ auto* compositedAncestor = m_owningLayer.ancestorCompositingLayer();
LayoutSize ancestorClippingLayerOffset;
LayoutRect parentGraphicsLayerRect = computeParentGraphicsLayerRect(compositedAncestor, ancestorClippingLayerOffset);
LayoutRect primaryGraphicsLayerRect = computePrimaryGraphicsLayerRect(parentGraphicsLayerRect);
@@ -1028,7 +1028,7 @@
// If we have a layer that clips children, position it.
LayoutRect clippingBox;
- if (GraphicsLayer* clipLayer = clippingLayer()) {
+ if (auto* clipLayer = clippingLayer()) {
clippingBox = clipBox(downcast<RenderBox>(renderer()));
// Clipping layer is parented in the primary graphics layer.
LayoutSize clipBoxOffsetFromGraphicsLayer = toLayoutSize(clippingBox.location()) + rendererOffset.fromPrimaryGraphicsLayer();
@@ -1062,7 +1062,7 @@
else
m_graphicsLayer->setAnchorPoint(anchor);
- GraphicsLayer* clipLayer = clippingLayer();
+ auto* clipLayer = clippingLayer();
if (style.hasPerspective()) {
TransformationMatrix t = owningLayer().perspectiveTransform();
@@ -1114,7 +1114,7 @@
}
if (m_owningLayer.reflectionLayer() && m_owningLayer.reflectionLayer()->isComposited()) {
- RenderLayerBacking* reflectionBacking = m_owningLayer.reflectionLayer()->backing();
+ auto* reflectionBacking = m_owningLayer.reflectionLayer()->backing();
reflectionBacking->updateGeometry();
// The reflection layer has the bounds of m_owningLayer.reflectionLayer(),
@@ -1297,7 +1297,7 @@
}
if (m_scrollingLayer) {
- GraphicsLayer* superlayer = m_childContainmentLayer ? m_childContainmentLayer.get() : m_graphicsLayer.get();
+ auto* superlayer = m_childContainmentLayer ? m_childContainmentLayer.get() : m_graphicsLayer.get();
m_scrollingLayer->removeFromParent();
superlayer->addChild(m_scrollingLayer.get());
}
@@ -1503,7 +1503,7 @@
const IntRect borderBox = snappedIntRect(renderBox()->borderBoxRect());
FloatSize offsetFromRenderer = m_graphicsLayer->offsetFromRenderer();
- if (GraphicsLayer* layer = layerForHorizontalScrollbar()) {
+ if (auto* layer = layerForHorizontalScrollbar()) {
IntRect hBarRect = m_owningLayer.rectForHorizontalScrollbar(borderBox);
layer->setPosition(hBarRect.location() - offsetFromRenderer);
layer->setSize(hBarRect.size());
@@ -1515,7 +1515,7 @@
layer->setDrawsContent(m_owningLayer.horizontalScrollbar() && !layer->usesContentsLayer());
}
- if (GraphicsLayer* layer = layerForVerticalScrollbar()) {
+ if (auto* layer = layerForVerticalScrollbar()) {
IntRect vBarRect = m_owningLayer.rectForVerticalScrollbar(borderBox);
layer->setPosition(vBarRect.location() - offsetFromRenderer);
layer->setSize(vBarRect.size());
@@ -1527,7 +1527,7 @@
layer->setDrawsContent(m_owningLayer.verticalScrollbar() && !layer->usesContentsLayer());
}
- if (GraphicsLayer* layer = layerForScrollCorner()) {
+ if (auto* layer = layerForScrollCorner()) {
const LayoutRect& scrollCornerAndResizer = m_owningLayer.scrollCornerAndResizerRect();
layer->setPosition(scrollCornerAndResizer.location() - offsetFromRenderer);
layer->setSize(scrollCornerAndResizer.size());
@@ -1537,17 +1537,20 @@
bool RenderLayerBacking::hasUnpositionedOverflowControlsLayers() const
{
- if (GraphicsLayer* layer = layerForHorizontalScrollbar())
+ if (auto* layer = layerForHorizontalScrollbar()) {
if (!layer->drawsContent())
return true;
+ }
- if (GraphicsLayer* layer = layerForVerticalScrollbar())
+ if (auto* layer = layerForVerticalScrollbar()) {
if (!layer->drawsContent())
return true;
+ }
- if (GraphicsLayer* layer = layerForScrollCorner())
+ if (auto* layer = layerForScrollCorner()) {
if (!layer->drawsContent())
return true;
+ }
return false;
}
@@ -1781,7 +1784,7 @@
{
float finalOpacity = rendererOpacity;
- for (RenderLayer* curr = m_owningLayer.parent(); curr; curr = curr->parent()) {
+ for (auto* curr = m_owningLayer.parent(); curr; curr = curr->parent()) {
// We only care about parents that are stacking contexts.
// Recall that opacity creates stacking context.
if (!curr->isStackingContainer())
@@ -1995,7 +1998,7 @@
if (!is<RenderEmbeddedObject>(renderer))
return false;
- HTMLFrameOwnerElement& element = downcast<RenderEmbeddedObject>(renderer).frameOwnerElement();
+ auto& element = downcast<RenderEmbeddedObject>(renderer).frameOwnerElement();
if (!is<HTMLPlugInElement>(element))
return false;
@@ -2170,11 +2173,11 @@
#endif
auto& imageRenderer = downcast<RenderImage>(renderer());
- if (CachedImage* cachedImage = imageRenderer.cachedImage()) {
+ if (auto* cachedImage = imageRenderer.cachedImage()) {
if (!cachedImage->hasImage())
return false;
- Image* image = cachedImage->imageForRenderer(&imageRenderer);
+ auto* image = cachedImage->imageForRenderer(&imageRenderer);
if (!image->isBitmapImage())
return false;
@@ -2224,11 +2227,11 @@
{
auto& imageRenderer = downcast<RenderImage>(renderer());
- CachedImage* cachedImage = imageRenderer.cachedImage();
+ auto* cachedImage = imageRenderer.cachedImage();
if (!cachedImage)
return;
- Image* image = cachedImage->imageForRenderer(&imageRenderer);
+ auto* image = cachedImage->imageForRenderer(&imageRenderer);
if (!image)
return;
@@ -2381,7 +2384,7 @@
{
ASSERT(!paintsIntoCompositedAncestor());
- FrameView& frameView = renderer().view().frameView();
+ auto& frameView = renderer().view().frameView();
if (m_isMainFrameRenderViewLayer && frameView.isTrackingRepaints())
frameView.addTrackedRepaintRect(owningLayer().absoluteBoundingBoxForPainting());
@@ -2389,7 +2392,7 @@
// By default, setNeedsDisplay will clip to the size of the GraphicsLayer, which does not include margin tiles.
// So if the TiledBacking has a margin that needs to be invalidated, we need to send in a rect to setNeedsDisplayInRect
// that is large enough to include the margin. TiledBacking::bounds() includes the margin.
- TiledBacking* tiledBacking = this->tiledBacking();
+ auto* tiledBacking = this->tiledBacking();
FloatRect rectToRepaint = tiledBacking ? tiledBacking->bounds() : FloatRect(FloatPoint(0, 0), m_graphicsLayer->size());
m_graphicsLayer->setNeedsDisplayInRect(rectToRepaint, shouldClip);
}
@@ -2416,7 +2419,7 @@
ASSERT(!paintsIntoCompositedAncestor());
FloatRect pixelSnappedRectForPainting = snapRectToDevicePixels(r, deviceScaleFactor());
- FrameView& frameView = renderer().view().frameView();
+ auto& frameView = renderer().view().frameView();
if (m_isMainFrameRenderViewLayer && frameView.isTrackingRepaints())
frameView.addTrackedRepaintRect(pixelSnappedRectForPainting);
@@ -2609,7 +2612,7 @@
bool RenderLayerBacking::getCurrentTransform(const GraphicsLayer* graphicsLayer, TransformationMatrix& transform) const
{
- GraphicsLayer* transformedLayer = m_contentsContainmentLayer.get() ? m_contentsContainmentLayer.get() : m_graphicsLayer.get();
+ auto* transformedLayer = m_contentsContainmentLayer.get() ? m_contentsContainmentLayer.get() : m_graphicsLayer.get();
if (graphicsLayer != transformedLayer)
return false;
@@ -2677,7 +2680,7 @@
void RenderLayerBacking::logFilledVisibleFreshTile(unsigned blankPixelCount)
{
- if (PerformanceLoggingClient* loggingClient = renderer().page().performanceLoggingClient())
+ if (auto* loggingClient = renderer().page().performanceLoggingClient())
loggingClient->logScrollingEvent(PerformanceLoggingClient::ScrollingEvent::FilledTile, MonotonicTime::now(), blankPixelCount);
}
@@ -2718,7 +2721,7 @@
if (!keyframeStyle)
continue;
- TimingFunction* tf = currentKeyframe.timingFunction(keyframes.animationName());
+ auto* tf = currentKeyframe.timingFunction(keyframes.animationName());
bool isFirstOrLastKeyframe = key == 0 || key == 1;
if ((hasTransform && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyTransform))
@@ -2890,7 +2893,7 @@
LayoutRect RenderLayerBacking::compositedBoundsIncludingMargin() const
{
- TiledBacking* tiledBacking = this->tiledBacking();
+ auto* tiledBacking = this->tiledBacking();
if (!tiledBacking || !tiledBacking->hasMargins())
return compositedBounds();
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (224109 => 224110)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-10-27 10:27:36 UTC (rev 224109)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-10-27 14:38:41 UTC (rev 224110)
@@ -430,13 +430,13 @@
return;
}
- FrameView& frameView = m_renderView.frameView();
+ auto& frameView = m_renderView.frameView();
AnimationUpdateBlock animationUpdateBlock(&frameView.frame().animation());
ASSERT(!m_flushingLayers);
m_flushingLayers = true;
- if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
+ if (auto* rootLayer = rootGraphicsLayer()) {
#if PLATFORM(IOS)
FloatRect exposedRect = frameView.exposedContentRect();
LOG_WITH_STREAM(Compositing, stream << "\nRenderLayerCompositor " << this << " flushPendingLayerChanges (is root " << isFlushRoot << ") exposedRect " << exposedRect);
@@ -474,9 +474,9 @@
{
updateScrollCoordinatedLayersAfterFlush();
- Frame& frame = m_renderView.frameView().frame();
+ auto& frame = m_renderView.frameView().frame();
for (Frame* subframe = frame.tree().firstChild(); subframe; subframe = subframe->tree().traverseNext(&frame)) {
- RenderView* view = subframe->contentRenderer();
+ auto* view = subframe->contentRenderer();
if (!view)
continue;
@@ -509,7 +509,7 @@
// FIXME: Can we make |layer| const RenderLayer&?
static void updateScrollingLayerWithClient(RenderLayer& layer, ChromeClient& client)
{
- RenderLayerBacking* backing = layer.backing();
+ auto* backing = layer.backing();
ASSERT(backing);
bool allowHorizontalScrollbar = !scrollbarHasDisplayNone(layer.horizontalScrollbar());
@@ -541,7 +541,7 @@
m_scrollingLayersNeedingUpdate.add(&layer);
#endif
- RenderLayerBacking* backing = layer.backing();
+ auto* backing = layer.backing();
if (backing->backgroundLayerPaintsFixedRootBackground() && graphicsLayer == backing->backgroundLayer())
fixedRootBackgroundLayerChanged();
}
@@ -548,7 +548,7 @@
void RenderLayerCompositor::didPaintBacking(RenderLayerBacking*)
{
- FrameView& frameView = m_renderView.frameView();
+ auto& frameView = m_renderView.frameView();
frameView.setLastPaintTime(monotonicallyIncreasingTime());
if (frameView.milestonesPendingPaint())
frameView.firePaintRelatedMilestonesIfNeeded();
@@ -556,7 +556,7 @@
void RenderLayerCompositor::didChangeVisibleRect()
{
- GraphicsLayer* rootLayer = rootGraphicsLayer();
+ auto* rootLayer = rootGraphicsLayer();
if (!rootLayer)
return;
@@ -600,8 +600,8 @@
RenderLayerCompositor* RenderLayerCompositor::enclosingCompositorFlushingLayers() const
{
- for (Frame* frame = &m_renderView.frameView().frame(); frame; frame = frame->tree().parent()) {
- RenderLayerCompositor* compositor = frame->contentRenderer() ? &frame->contentRenderer()->compositor() : nullptr;
+ for (auto* frame = &m_renderView.frameView().frame(); frame; frame = frame->tree().parent()) {
+ auto* compositor = frame->contentRenderer() ? &frame->contentRenderer()->compositor() : nullptr;
if (compositor->isFlushingLayers())
return compositor;
}
@@ -722,7 +722,7 @@
m_obligatoryBackingStoreBytes = 0;
m_secondaryBackingStoreBytes = 0;
- Frame& frame = m_renderView.frameView().frame();
+ auto& frame = m_renderView.frameView().frame();
bool isMainFrame = isMainFrameCompositor();
LOG(Compositing, "\nUpdate %d of %s.\n", m_rootLayerUpdateCount, isMainFrame ? "main frame" : frame.tree().uniqueName().string().utf8().data());
}
@@ -778,7 +778,7 @@
if (!isMainFrameCompositor() || !m_compositing)
return;
- Frame& frame = m_renderView.frameView().frame();
+ auto& frame = m_renderView.frameView().frame();
childList.append(&frame.mainFrame().pageOverlayController().layerWithDocumentOverlays());
}
@@ -797,7 +797,7 @@
if (!compositingLogEnabled())
return;
- RenderLayerBacking* backing = layer.backing();
+ auto* backing = layer.backing();
if (requiresCompositingLayer(layer) || layer.isRenderViewLayer()) {
++m_obligateCompositedLayerCount;
m_obligatoryBackingStoreBytes += backing->backingStoreMemoryEstimate();
@@ -868,8 +868,8 @@
static bool checkIfDescendantClippingContextNeedsUpdate(const RenderLayer& layer, bool isClipping)
{
- for (RenderLayer* child = layer.firstChild(); child; child = child->nextSibling()) {
- RenderLayerBacking* backing = child->backing();
+ for (auto* child = layer.firstChild(); child; child = child->nextSibling()) {
+ auto* backing = child->backing();
if (backing && (isClipping || backing->hasAncestorClippingLayer()))
return true;
@@ -900,8 +900,8 @@
// FIXME: need to check everything that we consult to avoid backing store here: webkit.org/b/138383
if (!oldStyle.opacity() != !newStyle.opacity()) {
- RenderLayerModelObject* repaintContainer = layer.renderer().containerForRepaint();
- if (RenderLayerBacking* ancestorBacking = repaintContainer ? repaintContainer->layer()->backing() : nullptr) {
+ auto* repaintContainer = layer.renderer().containerForRepaint();
+ if (auto* ancestorBacking = repaintContainer ? repaintContainer->layer()->backing() : nullptr) {
if (static_cast<bool>(newStyle.opacity()) != ancestorBacking->graphicsLayer()->drawsContent())
return true;
}
@@ -981,13 +981,13 @@
if (layer.renderer().hasMask())
return false;
- ClipPathOperation& clipPath = *layer.renderer().style().clipPath();
+ auto& clipPath = *layer.renderer().style().clipPath();
return (clipPath.type() != ClipPathOperation::Shape || clipPath.type() == ClipPathOperation::Shape) && GraphicsLayer::supportsLayerType(GraphicsLayer::Type::Shape);
}
static RenderLayerModelObject& rendererForCompositingTests(const RenderLayer& layer)
{
- RenderLayerModelObject* renderer = &layer.renderer();
+ auto* renderer = &layer.renderer();
// The compositing state of a reflection should match that of its reflected layer.
if (layer.isReflection())
@@ -1025,7 +1025,7 @@
if (layer.isRenderViewLayer() && useCoordinatedScrollingForLayer(layer)) {
updateScrollCoordinatedStatus(layer, { ScrollingNodeChangeFlags::Layer, ScrollingNodeChangeFlags::LayerGeometry });
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
#if ENABLE(RUBBER_BANDING)
updateLayerForHeader(page().headerHeight());
@@ -1033,7 +1033,7 @@
#endif
updateRootContentLayerClipping();
- if (TiledBacking* tiledBacking = layer.backing()->tiledBacking())
+ if (auto* tiledBacking = layer.backing()->tiledBacking())
tiledBacking->setTopContentInset(m_renderView.frameView().topContentInset());
}
@@ -1050,8 +1050,8 @@
// its replica GraphicsLayer. In practice this should never happen because reflectee and reflection
// are both either composited, or not composited.
if (layer.isReflection()) {
- RenderLayer* sourceLayer = downcast<RenderLayerModelObject>(*layer.renderer().parent()).layer();
- if (RenderLayerBacking* backing = sourceLayer->backing()) {
+ auto* sourceLayer = downcast<RenderLayerModelObject>(*layer.renderer().parent()).layer();
+ if (auto* backing = sourceLayer->backing()) {
ASSERT(backing->graphicsLayer()->replicaLayer() == layer.backing()->graphicsLayer());
backing->graphicsLayer()->setReplicatedByLayer(nullptr);
}
@@ -1080,7 +1080,7 @@
#endif
if (layerChanged && is<RenderWidget>(layer.renderer())) {
- RenderLayerCompositor* innerCompositor = frameContentsCompositor(&downcast<RenderWidget>(layer.renderer()));
+ auto* innerCompositor = frameContentsCompositor(&downcast<RenderWidget>(layer.renderer()));
if (innerCompositor && innerCompositor->inCompositingMode())
innerCompositor->updateRootLayerAttachment();
}
@@ -1096,7 +1096,7 @@
layerChanged = true;
}
if (layerChanged) {
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView.frameView());
}
} else
@@ -1126,7 +1126,7 @@
if (&layer.renderer() != &m_renderView && !layer.renderer().parent())
return;
- RenderLayerModelObject* repaintContainer = layer.renderer().containerForRepaint();
+ auto* repaintContainer = layer.renderer().containerForRepaint();
if (!repaintContainer)
repaintContainer = &m_renderView;
@@ -1142,7 +1142,7 @@
// This method assumes that layout is up-to-date, unlike repaintOnCompositingChange().
void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer& layer, const LayoutRect& rect)
{
- RenderLayer* compositedAncestor = layer.enclosingCompositingLayerForRepaint(ExcludeSelf);
+ auto* compositedAncestor = layer.enclosingCompositingLayerForRepaint(ExcludeSelf);
if (!compositedAncestor)
return;
@@ -1176,7 +1176,7 @@
RenderLayer* RenderLayerCompositor::enclosingNonStackingClippingLayer(const RenderLayer& layer) const
{
- for (RenderLayer* parent = layer.parent(); parent; parent = parent->parent()) {
+ for (auto* parent = layer.parent(); parent; parent = parent->parent()) {
if (parent->isStackingContainer())
return nullptr;
if (parent->renderer().hasClipOrOverflowClip())
@@ -1492,8 +1492,8 @@
return;
if (parentLayer) {
- GraphicsLayer* hostingLayer = parentLayer->backing()->parentForSublayers();
- GraphicsLayer* hostedLayer = childLayer.backing()->childForSuperlayers();
+ auto* hostingLayer = parentLayer->backing()->parentForSublayers();
+ auto* hostedLayer = childLayer.backing()->childForSuperlayers();
hostingLayer->addChild(hostedLayer);
} else
@@ -1523,13 +1523,13 @@
// Note that we can only do work here that is independent of whether the descendant layers
// have been processed. computeCompositingRequirements() will already have done the repaint if necessary.
- RenderLayerBacking* layerBacking = layer.backing();
+ auto* layerBacking = layer.backing();
if (layerBacking) {
// The compositing state of all our children has been updated already, so now
// we can compute and cache the composited bounds for this layer.
layerBacking->updateCompositedBounds();
- if (RenderLayer* reflection = layer.reflectionLayer()) {
+ if (auto* reflection = layer.reflectionLayer()) {
if (reflection->backing())
reflection->backing()->updateCompositedBounds();
}
@@ -1590,17 +1590,17 @@
// If the layer has a clipping layer the overflow controls layers will be siblings of the clipping layer.
// Otherwise, the overflow control layers are normal children.
if (!layerBacking->hasClippingLayer() && !layerBacking->hasScrollingLayer()) {
- if (GraphicsLayer* overflowControlLayer = layerBacking->layerForHorizontalScrollbar()) {
+ if (auto* overflowControlLayer = layerBacking->layerForHorizontalScrollbar()) {
overflowControlLayer->removeFromParent();
layerBacking->parentForSublayers()->addChild(overflowControlLayer);
}
- if (GraphicsLayer* overflowControlLayer = layerBacking->layerForVerticalScrollbar()) {
+ if (auto* overflowControlLayer = layerBacking->layerForVerticalScrollbar()) {
overflowControlLayer->removeFromParent();
layerBacking->parentForSublayers()->addChild(overflowControlLayer);
}
- if (GraphicsLayer* overflowControlLayer = layerBacking->layerForScrollCorner()) {
+ if (auto* overflowControlLayer = layerBacking->layerForScrollCorner()) {
overflowControlLayer->removeFromParent();
layerBacking->parentForSublayers()->addChild(overflowControlLayer);
}
@@ -1609,7 +1609,7 @@
childLayersOfEnclosingLayer.append(layerBacking->childForSuperlayers());
}
- if (RenderLayerBacking* layerBacking = layer.backing())
+ if (auto* layerBacking = layer.backing())
layerBacking->updateAfterDescendants();
}
@@ -1640,7 +1640,7 @@
bool RenderLayerCompositor::hasCoordinatedScrolling() const
{
- ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
+ auto* scrollingCoordinator = this->scrollingCoordinator();
return scrollingCoordinator && scrollingCoordinator->coordinatesScrollingForFrameView(m_renderView.frameView());
}
@@ -1648,18 +1648,18 @@
{
ASSERT(m_scrollLayer);
- FrameView& frameView = m_renderView.frameView();
+ auto& frameView = m_renderView.frameView();
IntPoint scrollPosition = frameView.scrollPosition();
m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
- if (GraphicsLayer* fixedBackgroundLayer = fixedRootBackgroundLayer())
+ if (auto* fixedBackgroundLayer = fixedRootBackgroundLayer())
fixedBackgroundLayer->setPosition(frameView.scrollPositionForFixedPosition());
}
FloatPoint RenderLayerCompositor::positionForClipLayer() const
{
- FrameView& frameView = m_renderView.frameView();
+ auto& frameView = m_renderView.frameView();
return FloatPoint(
frameView.shouldPlaceBlockDirectionScrollbarOnLeft() ? frameView.horizontalScrollbarIntrusion() : 0,
@@ -1689,14 +1689,13 @@
void RenderLayerCompositor::frameViewDidLayout()
{
- RenderLayerBacking* renderViewBacking = m_renderView.layer()->backing();
- if (renderViewBacking)
+ if (auto* renderViewBacking = m_renderView.layer()->backing())
renderViewBacking->adjustTiledBackingCoverage();
}
void RenderLayerCompositor::rootFixedBackgroundsChanged()
{
- RenderLayerBacking* renderViewBacking = m_renderView.layer()->backing();
+ auto* renderViewBacking = m_renderView.layer()->backing();
if (renderViewBacking && renderViewBacking->isFrameLayerWithTiledBacking())
setCompositingLayersNeedRebuild();
}
@@ -1703,7 +1702,7 @@
void RenderLayerCompositor::scrollingLayerDidChange(RenderLayer& layer)
{
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollLayerDidChange(layer);
}
@@ -1762,8 +1761,8 @@
RenderLayerCompositor* RenderLayerCompositor::frameContentsCompositor(RenderWidget* renderer)
{
- if (Document* contentDocument = renderer->frameOwnerElement().contentDocument()) {
- if (RenderView* view = contentDocument->renderView())
+ if (auto* contentDocument = renderer->frameOwnerElement().contentDocument()) {
+ if (auto* view = contentDocument->renderView())
return &view->compositor();
}
return nullptr;
@@ -1771,17 +1770,17 @@
bool RenderLayerCompositor::parentFrameContentLayers(RenderWidget* renderer)
{
- RenderLayerCompositor* innerCompositor = frameContentsCompositor(renderer);
+ auto* innerCompositor = frameContentsCompositor(renderer);
if (!innerCompositor || !innerCompositor->inCompositingMode() || innerCompositor->rootLayerAttachment() != RootLayerAttachedViaEnclosingFrame)
return false;
- RenderLayer* layer = renderer->layer();
+ auto* layer = renderer->layer();
if (!layer->isComposited())
return false;
- RenderLayerBacking* backing = layer->backing();
- GraphicsLayer* hostingLayer = backing->parentForSublayers();
- GraphicsLayer* rootLayer = innerCompositor->rootGraphicsLayer();
+ auto* backing = layer->backing();
+ auto* hostingLayer = backing->parentForSublayers();
+ auto* rootLayer = innerCompositor->rootGraphicsLayer();
if (hostingLayer->children().size() != 1 || hostingLayer->children()[0] != rootLayer) {
hostingLayer->removeAllChildren();
hostingLayer->addChild(rootLayer);
@@ -1792,12 +1791,12 @@
// This just updates layer geometry without changing the hierarchy.
void RenderLayerCompositor::updateLayerTreeGeometry(RenderLayer& layer, int depth)
{
- if (RenderLayerBacking* layerBacking = layer.backing()) {
+ if (auto* layerBacking = layer.backing()) {
// The compositing state of all our children has been updated already, so now
// we can compute and cache the composited bounds for this layer.
layerBacking->updateCompositedBounds();
- if (RenderLayer* reflection = layer.reflectionLayer()) {
+ if (auto* reflection = layer.reflectionLayer()) {
if (reflection->backing())
reflection->backing()->updateCompositedBounds();
}
@@ -1834,7 +1833,7 @@
updateLayerTreeGeometry(*renderLayer, depth + 1);
}
- if (RenderLayerBacking* layerBacking = layer.backing())
+ if (auto* layerBacking = layer.backing())
layerBacking->updateAfterDescendants();
}
@@ -1842,10 +1841,10 @@
void RenderLayerCompositor::updateCompositingDescendantGeometry(RenderLayer& compositingAncestor, RenderLayer& layer, bool compositedChildrenOnly)
{
if (&layer != &compositingAncestor) {
- if (RenderLayerBacking* layerBacking = layer.backing()) {
+ if (auto* layerBacking = layer.backing()) {
layerBacking->updateCompositedBounds();
- if (RenderLayer* reflection = layer.reflectionLayer()) {
+ if (auto* reflection = layer.reflectionLayer()) {
if (reflection->backing())
reflection->backing()->updateCompositedBounds();
}
@@ -1884,7 +1883,7 @@
}
if (&layer != &compositingAncestor) {
- if (RenderLayerBacking* layerBacking = layer.backing())
+ if (auto* layerBacking = layer.backing())
layerBacking->updateAfterDescendants();
}
}
@@ -1940,7 +1939,7 @@
if (!inCompositingMode())
return;
- if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
+ if (auto* rootLayer = rootGraphicsLayer()) {
GraphicsLayer::traverse(*rootLayer, [isInWindow](GraphicsLayer& layer) {
layer.setIsInWindow(isInWindow);
});
@@ -1975,7 +1974,7 @@
layer.clearBacking();
}
- for (RenderLayer* childLayer = layer.firstChild(); childLayer; childLayer = childLayer->nextSibling())
+ for (auto* childLayer = layer.firstChild(); childLayer; childLayer = childLayer->nextSibling())
clearBackingForLayerIncludingDescendants(*childLayer);
}
@@ -2303,7 +2302,7 @@
if (!layer.isComposited() || !layer.parent())
return false;
- RenderLayer* compositingAncestor = layer.ancestorCompositingLayer();
+ auto* compositingAncestor = layer.ancestorCompositingLayer();
if (!compositingAncestor)
return false;
@@ -2312,12 +2311,12 @@
// and layer. The exception is when the compositingAncestor isolates composited blending children,
// in this case it is not allowed to clipsCompositingDescendants() and each of its children
// will be clippedByAncestor()s, including the compositingAncestor.
- RenderLayer* computeClipRoot = compositingAncestor;
+ auto* computeClipRoot = compositingAncestor;
if (!compositingAncestor->isolatesCompositedBlending()) {
computeClipRoot = nullptr;
- RenderLayer* parent = &layer;
+ auto* parent = &layer;
while (parent) {
- RenderLayer* next = parent->parent();
+ auto* next = parent->parent();
if (next == compositingAncestor) {
computeClipRoot = parent;
break;
@@ -2380,7 +2379,7 @@
return true;
// FIXME: workaround for webkit.org/b/132801
- RenderLayer* stackingContext = renderer.layer()->stackingContainer();
+ auto* stackingContext = renderer.layer()->stackingContainer();
if (stackingContext && stackingContext->renderer().style().transformStyle3D() == TransformStyle3DPreserve3D)
return true;
@@ -2411,7 +2410,7 @@
#if USE(COMPOSITING_FOR_SMALL_CANVASES)
bool isCanvasLargeEnoughToForceCompositing = true;
#else
- HTMLCanvasElement* canvas = downcast<HTMLCanvasElement>(renderer.element());
+ auto* canvas = downcast<HTMLCanvasElement>(renderer.element());
auto canvasArea = canvas->size().area<RecordOverflow>();
bool isCanvasLargeEnoughToForceCompositing = !canvasArea.hasOverflowed() && canvasArea.unsafeGet() >= canvasAreaThresholdRequiringCompositing;
#endif
@@ -2433,7 +2432,7 @@
m_reevaluateCompositingAfterLayout = true;
- RenderWidget& pluginRenderer = downcast<RenderWidget>(renderer);
+ auto& pluginRenderer = downcast<RenderWidget>(renderer);
if (pluginRenderer.style().visibility() != VISIBLE)
return false;
@@ -2474,7 +2473,7 @@
return false;
const AnimationBase::RunningState activeAnimationState = AnimationBase::Running | AnimationBase::Paused;
- CSSAnimationController& animController = renderer.animation();
+ auto& animController = renderer.animation();
return (animController.isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity, activeAnimationState)
&& (inCompositingMode() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger)))
|| animController.isRunningAnimationOnRenderer(renderer, CSSPropertyFilter, activeAnimationState)
@@ -2486,7 +2485,7 @@
bool RenderLayerCompositor::requiresCompositingForIndirectReason(RenderLayerModelObject& renderer, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason& reason) const
{
- RenderLayer& layer = *downcast<RenderBoxModelObject>(renderer).layer();
+ auto& layer = *downcast<RenderBoxModelObject>(renderer).layer();
// When a layer has composited descendants, some effects, like 2d transforms, filters, masks etc must be implemented
// via compositing so that they also apply to those composited descendants.
@@ -2560,7 +2559,7 @@
{
ASSERT(layer.renderer().isStickyPositioned());
- RenderLayer* enclosingOverflowLayer = layer.enclosingOverflowClipLayer(ExcludeSelf);
+ auto* enclosingOverflowLayer = layer.enclosingOverflowClipLayer(ExcludeSelf);
#if PLATFORM(IOS)
if (enclosingOverflowLayer && enclosingOverflowLayer->hasTouchScrollableOverflow()) {
@@ -2596,7 +2595,7 @@
return false;
// FIXME: Handle fixed inside of a transform, which should not behave as fixed.
- for (RenderLayer* stackingContainer = layer.stackingContainer(); stackingContainer; stackingContainer = stackingContainer->stackingContainer()) {
+ for (auto* stackingContainer = layer.stackingContainer(); stackingContainer; stackingContainer = stackingContainer->stackingContainer()) {
if (stackingContainer->isComposited() && stackingContainer->renderer().style().position() == FixedPosition)
return false;
}
@@ -2724,7 +2723,7 @@
bool RenderLayerCompositor::requiresScrollLayer(RootLayerAttachment attachment) const
{
- FrameView& frameView = m_renderView.frameView();
+ auto& frameView = m_renderView.frameView();
// This applies when the application UI handles scrolling, in which case RenderLayerCompositor doesn't need to manage it.
if (frameView.delegatesScrolling() && isMainFrameCompositor())
@@ -2769,7 +2768,7 @@
bool RenderLayerCompositor::supportsFixedRootBackgroundCompositing() const
{
- RenderLayerBacking* renderViewBacking = m_renderView.layer()->backing();
+ auto* renderViewBacking = m_renderView.layer()->backing();
return renderViewBacking && renderViewBacking->isFrameLayerWithTiledBacking();
}
@@ -2789,7 +2788,7 @@
GraphicsLayer* RenderLayerCompositor::fixedRootBackgroundLayer() const
{
// Get the fixed root background from the RenderView layer's backing.
- RenderLayer* viewLayer = m_renderView.layer();
+ auto* viewLayer = m_renderView.layer();
if (!viewLayer)
return nullptr;
@@ -2801,7 +2800,7 @@
void RenderLayerCompositor::resetTrackedRepaintRects()
{
- if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
+ if (auto* rootLayer = rootGraphicsLayer()) {
GraphicsLayer::traverse(*rootLayer, [](GraphicsLayer& layer) {
layer.resetTrackedRepaints();
});
@@ -2827,7 +2826,7 @@
{
#if PLATFORM(IOS)
LegacyTileCache* tileCache = nullptr;
- if (FrameView* frameView = page().mainFrame().view())
+ if (auto* frameView = page().mainFrame().view())
tileCache = frameView->legacyTileCache();
if (!tileCache)
@@ -2846,11 +2845,11 @@
bool RenderLayerCompositor::documentUsesTiledBacking() const
{
- RenderLayer* layer = m_renderView.layer();
+ auto* layer = m_renderView.layer();
if (!layer)
return false;
- RenderLayerBacking* backing = layer->backing();
+ auto* backing = layer->backing();
if (!backing)
return false;
@@ -2864,7 +2863,7 @@
bool RenderLayerCompositor::shouldCompositeOverflowControls() const
{
- FrameView& frameView = m_renderView.frameView();
+ auto& frameView = m_renderView.frameView();
if (frameView.platformWidget())
return false;
@@ -2990,7 +2989,7 @@
// The ScrollingTree knows about the header layer, and the position of the root layer is affected
// by the header layer, so if we remove the header, we need to tell the scrolling tree.
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
}
return nullptr;
@@ -3008,7 +3007,7 @@
m_layerForHeader->setAnchorPoint(FloatPoint3D());
m_layerForHeader->setSize(FloatSize(m_renderView.frameView().visibleWidth(), m_renderView.frameView().headerHeight()));
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
page().chrome().client().didAddHeaderLayer(*m_layerForHeader);
@@ -3028,7 +3027,7 @@
// The ScrollingTree knows about the footer layer, and the total scrollable size is affected
// by the footer layer, so if we remove the footer, we need to tell the scrolling tree.
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
}
return nullptr;
@@ -3046,7 +3045,7 @@
m_layerForFooter->setAnchorPoint(FloatPoint3D());
m_layerForFooter->setSize(FloatSize(m_renderView.frameView().visibleWidth(), m_renderView.frameView().footerHeight()));
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
page().chrome().client().didAddFooterLayer(*m_layerForFooter);
@@ -3191,7 +3190,7 @@
#endif
m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get());
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView.frameView(), HorizontalScrollbar);
}
} else if (m_layerForHorizontalScrollbar) {
@@ -3198,7 +3197,7 @@
m_layerForHorizontalScrollbar->removeFromParent();
m_layerForHorizontalScrollbar = nullptr;
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView.frameView(), HorizontalScrollbar);
}
@@ -3213,7 +3212,7 @@
#endif
m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get());
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView.frameView(), VerticalScrollbar);
}
} else if (m_layerForVerticalScrollbar) {
@@ -3220,7 +3219,7 @@
m_layerForVerticalScrollbar->removeFromParent();
m_layerForVerticalScrollbar = nullptr;
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView.frameView(), VerticalScrollbar);
}
@@ -3258,7 +3257,7 @@
#if PLATFORM(IOS)
// Page scale is applied above this on iOS, so we'll just say that our root layer applies it.
- Frame& frame = m_renderView.frameView().frame();
+ auto& frame = m_renderView.frameView().frame();
if (frame.isMainFrame())
m_rootContentLayer->setAppliesPageScale();
#endif
@@ -3332,9 +3331,9 @@
if (m_layerForHorizontalScrollbar) {
m_layerForHorizontalScrollbar->removeFromParent();
m_layerForHorizontalScrollbar = nullptr;
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView.frameView(), HorizontalScrollbar);
- if (Scrollbar* horizontalScrollbar = m_renderView.frameView().verticalScrollbar())
+ if (auto* horizontalScrollbar = m_renderView.frameView().verticalScrollbar())
m_renderView.frameView().invalidateScrollbar(*horizontalScrollbar, IntRect(IntPoint(0, 0), horizontalScrollbar->frameRect().size()));
}
@@ -3341,9 +3340,9 @@
if (m_layerForVerticalScrollbar) {
m_layerForVerticalScrollbar->removeFromParent();
m_layerForVerticalScrollbar = nullptr;
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ if (auto* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_renderView.frameView(), VerticalScrollbar);
- if (Scrollbar* verticalScrollbar = m_renderView.frameView().verticalScrollbar())
+ if (auto* verticalScrollbar = m_renderView.frameView().verticalScrollbar())
m_renderView.frameView().invalidateScrollbar(*verticalScrollbar, IntRect(IntPoint(0, 0), verticalScrollbar->frameRect().size()));
}
@@ -3375,7 +3374,7 @@
ASSERT_NOT_REACHED();
break;
case RootLayerAttachedViaChromeClient: {
- Frame& frame = m_renderView.frameView().frame();
+ auto& frame = m_renderView.frameView().frame();
page().chrome().client().attachRootGraphicsLayer(frame, rootGraphicsLayer());
if (frame.isMainFrame())
page().chrome().client().attachViewOverlayGraphicsLayer(frame, &frame.mainFrame().pageOverlayController().layerWithViewOverlays());
@@ -3413,12 +3412,12 @@
else
m_rootContentLayer->removeFromParent();
- if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement())
+ if (auto* ownerElement = m_renderView.document().ownerElement())
ownerElement->scheduleInvalidateStyleAndLayerComposition();
break;
}
case RootLayerAttachedViaChromeClient: {
- Frame& frame = m_renderView.frameView().frame();
+ auto& frame = m_renderView.frameView().frame();
page().chrome().client().attachRootGraphicsLayer(frame, nullptr);
if (frame.isMainFrame()) {
page().chrome().client().attachViewOverlayGraphicsLayer(frame, nullptr);
@@ -3447,12 +3446,12 @@
if (m_rootLayerAttachment == RootLayerUnattached)
return;
- Frame& frame = m_renderView.frameView().frame();
+ auto& frame = m_renderView.frameView().frame();
// The attachment can affect whether the RenderView layer's paintsIntoWindow() behavior,
// so call updateDrawsContent() to update that.
- RenderLayer* layer = m_renderView.layer();
- if (RenderLayerBacking* backing = layer ? layer->backing() : nullptr)
+ auto* layer = m_renderView.layer();
+ if (auto* backing = layer ? layer->backing() : nullptr)
backing->updateDrawsContent();
if (!frame.isMainFrame())
@@ -3465,7 +3464,7 @@
{
// Compositing affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
// we need to schedule a style recalc in our parent document.
- if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement())
+ if (auto* ownerElement = m_renderView.document().ownerElement())
ownerElement->scheduleInvalidateStyleAndLayerComposition();
}
@@ -3510,8 +3509,7 @@
{
// Page scale will only be applied at to the RenderView and sublayers, but the device scale factor
// needs to be applied at the level of rootGraphicsLayer().
- GraphicsLayer* rootLayer = rootGraphicsLayer();
- if (rootLayer)
+ if (auto* rootLayer = rootGraphicsLayer())
rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
}
@@ -3550,7 +3548,7 @@
{
ASSERT(layer.isComposited());
- GraphicsLayer* graphicsLayer = layer.backing()->graphicsLayer();
+ auto* graphicsLayer = layer.backing()->graphicsLayer();
FixedPositionViewportConstraints constraints;
constraints.setLayerPositionAtLastLayout(graphicsLayer->position());
@@ -3590,12 +3588,12 @@
ASSERT(!layer.enclosingOverflowClipLayer(ExcludeSelf));
#endif
- RenderBoxModelObject& renderer = downcast<RenderBoxModelObject>(layer.renderer());
+ auto& renderer = downcast<RenderBoxModelObject>(layer.renderer());
StickyPositionViewportConstraints constraints;
renderer.computeStickyPositionConstraints(constraints, renderer.constrainingRectForStickyPosition());
- GraphicsLayer* graphicsLayer = layer.backing()->graphicsLayer();
+ auto* graphicsLayer = layer.backing()->graphicsLayer();
constraints.setLayerPositionAtLastLayout(graphicsLayer->position());
constraints.setStickyOffsetAtLastLayout(renderer.stickyPositionOffset());
constraints.setAlignmentOffset(graphicsLayer->pixelAlignmentOffset());
@@ -3605,9 +3603,9 @@
static ScrollingNodeID enclosingScrollingNodeID(RenderLayer& layer, IncludeSelfOrNot includeSelf)
{
- RenderLayer* currLayer = includeSelf == IncludeSelf ? &layer : layer.parent();
+ auto* currLayer = includeSelf == IncludeSelf ? &layer : layer.parent();
while (currLayer) {
- if (RenderLayerBacking* backing = currLayer->backing()) {
+ if (auto* backing = currLayer->backing()) {
if (ScrollingNodeID nodeID = backing->scrollingNodeIDForChildren())
return nodeID;
}
@@ -3623,12 +3621,12 @@
return 0;
// Find the frame's enclosing layer in our render tree.
- HTMLFrameOwnerElement* ownerElement = frame.document()->ownerElement();
- RenderElement* frameRenderer = ownerElement ? ownerElement->renderer() : nullptr;
+ auto* ownerElement = frame.document()->ownerElement();
+ auto* frameRenderer = ownerElement ? ownerElement->renderer() : nullptr;
if (!frameRenderer)
return 0;
- RenderLayer* layerInParentDocument = frameRenderer->enclosingLayer();
+ auto* layerInParentDocument = frameRenderer->enclosingLayer();
if (!layerInParentDocument)
return 0;
@@ -3642,7 +3640,7 @@
m_subframeScrollLayersNeedReattach = false;
- ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
+ auto* scrollingCoordinator = this->scrollingCoordinator();
for (Frame* child = m_renderView.frameView().frame().tree().firstChild(); child; child = child->tree().nextSibling()) {
if (!child->document() || !child->view())
@@ -3649,7 +3647,7 @@
continue;
// Ignore frames that are not scroll-coordinated.
- FrameView* childFrameView = child->view();
+ auto* childFrameView = child->view();
ScrollingNodeID frameScrollingNodeID = childFrameView->scrollLayerID();
if (!frameScrollingNodeID)
continue;
@@ -3678,8 +3676,8 @@
ScrollingNodeID RenderLayerCompositor::attachScrollingNode(RenderLayer& layer, ScrollingNodeType nodeType, ScrollingNodeID parentNodeID)
{
- ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
- RenderLayerBacking* backing = layer.backing();
+ auto* scrollingCoordinator = this->scrollingCoordinator();
+ auto* backing = layer.backing();
// Crash logs suggest that backing can be null here, but we don't know how: rdar://problem/18545452.
ASSERT(backing);
if (!backing)
@@ -3702,7 +3700,7 @@
void RenderLayerCompositor::detachScrollCoordinatedLayer(RenderLayer& layer, LayerScrollCoordinationRoles roles)
{
- RenderLayerBacking* backing = layer.backing();
+ auto* backing = layer.backing();
if (!backing)
return;
@@ -3721,7 +3719,7 @@
void RenderLayerCompositor::updateScrollCoordinationForThisFrame(ScrollingNodeID parentNodeID)
{
- ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
+ auto* scrollingCoordinator = this->scrollingCoordinator();
ASSERT(scrollingCoordinator->coordinatesScrollingForFrameView(m_renderView.frameView()));
ScrollingNodeID nodeID = attachScrollingNode(*m_renderView.layer(), FrameScrollingNode, parentNodeID);
@@ -3730,7 +3728,7 @@
void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, LayerScrollCoordinationRoles reasons, OptionSet<ScrollingNodeChangeFlags> changes)
{
- ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
+ auto* scrollingCoordinator = this->scrollingCoordinator();
if (!scrollingCoordinator || !scrollingCoordinator->coordinatesScrollingForFrameView(m_renderView.frameView()))
return;
@@ -3742,7 +3740,7 @@
ASSERT(m_scrollCoordinatedLayers.contains(&layer));
ASSERT(layer.isComposited());
- RenderLayerBacking* backing = layer.backing();
+ auto* backing = layer.backing();
if (!backing)
return;
@@ -3903,7 +3901,7 @@
void RenderLayerCompositor::unregisterAllScrollingLayers()
{
for (auto* layer : m_scrollingLayers) {
- RenderLayerBacking* backing = layer->backing();
+ auto* backing = layer->backing();
ASSERT(backing);
page().chrome().client().removeScrollingLayer(layer->renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer());
}
@@ -3912,7 +3910,7 @@
void RenderLayerCompositor::willRemoveScrollingLayerWithBacking(RenderLayer& layer, RenderLayerBacking& backing)
{
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) {
+ if (auto* scrollingCoordinator = this->scrollingCoordinator()) {
backing.detachFromScrollingCoordinator(Scrolling);
// For Coordinated Graphics.
@@ -3927,8 +3925,8 @@
if (m_renderView.document().pageCacheState() != Document::NotInPageCache)
return;
- PlatformLayer* scrollingLayer = backing.scrollingLayer()->platformLayer();
- PlatformLayer* contentsLayer = backing.scrollingContentsLayer()->platformLayer();
+ auto* scrollingLayer = backing.scrollingLayer()->platformLayer();
+ auto* contentsLayer = backing.scrollingContentsLayer()->platformLayer();
page().chrome().client().removeScrollingLayer(layer.renderer().element(), scrollingLayer, contentsLayer);
#endif
}
@@ -3937,7 +3935,7 @@
{
updateScrollCoordinatedStatus(layer, { ScrollingNodeChangeFlags::Layer, ScrollingNodeChangeFlags::LayerGeometry });
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) {
+ if (auto* scrollingCoordinator = this->scrollingCoordinator()) {
// For Coordinated Graphics.
scrollingCoordinator->scrollableAreaScrollLayerDidChange(layer);
return;
@@ -4032,7 +4030,7 @@
#if ENABLE(CSS_SCROLL_SNAP)
void RenderLayerCompositor::updateScrollSnapPropertiesWithFrameView(const FrameView& frameView)
{
- if (ScrollingCoordinator* coordinator = scrollingCoordinator())
+ if (auto* coordinator = scrollingCoordinator())
coordinator->updateScrollSnapPropertiesWithFrameView(frameView);
}
#endif