WebKit Bugzilla
Attachment 369134 Details for
Bug 197561
: Implement "shared" compositing layers, allowing overlap layers to paint into the backing store of another layer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197561-20190506103500.patch (text/plain), 168.02 KB, created by
Simon Fraser (smfr)
on 2019-05-06 10:35:02 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-06 10:35:02 PDT
Size:
168.02 KB
patch
obsolete
>Subversion Revision: 244946 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6a7508864b474651815305cbfb47acfe8ef2a15a..934199eb6acb41c939ef08619a7272cafa1def7c 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,97 @@ >+2019-05-04 Simon Fraser <simon.fraser@apple.com> >+ >+ Implement "shared" compositing layers, allowing overlap layers to paint into the backing store of another layer >+ https://bugs.webkit.org/show_bug.cgi?id=197561 >+ <rdar://problem/50445998> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This change introduces the concept of "shared" layers for compositing. A "shared" layer >+ first paints itself, and then some set of layers which come later in paint order in the >+ same stacking context. This reduces the composited layer count in some overflow scrolling >+ scenarios, thereby also simplifying the scrolling tree. >+ >+ A shared layer stores a vector of "sharing" RenderLayer* in its RenderLayerBacking. >+ At paint time, the owning layer is painted, then the sharing layers, setting the owning layer >+ as the painting root so that positioning and clipping just work. >+ >+ Sharing layer relationships are constructed in RenderLayerCompositor::computeCompositingRequirements(). >+ We track the last layer which was composited in paint order as a shared candidate. If a later layer >+ would composite for overlap (and no other reasons), then we allow it to share with the candidate >+ if the candidate is in its ancestor containing block chain. Sharing is currently limited to layers >+ in the same stacking context. >+ >+ isComposited() returns false for sharing layers, but they are like composited layers in that >+ they behave as painting boundaries, so RenderLayer::paintLayer() needs to stop at them, >+ and repaints in shared layers have to be directed to their shared layer, hence >+ changes to RenderLayer::clippingRootForPainting() and RenderLayer::enclosingCompositingLayerForRepaint(). >+ >+ The clipping boundary logic in RenderLayer::backgroundClipRect() needed to be generalized so >+ that all calls to RenderLayer::parentClipRects() check for crossing painting boundaries >+ and use TemporaryClipRects in that case. >+ >+ Tests: compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller.html >+ compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html >+ compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html >+ compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness.html >+ compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html >+ compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html >+ compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll.html >+ compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content.html >+ compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip.html >+ compositing/shared-layers/overflow-scroll/shared-layer-clipping.html >+ compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds.html >+ compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking.html >+ compositing/shared-layers/overflow-scroll/shared-layer-repaint.html >+ compositing/shared-layers/remove-sharing-layer.html >+ compositing/shared-layers/sharing-cached-clip-rects.html >+ >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::~RenderLayer): >+ (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const): >+ (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const): >+ (WebCore::RenderLayer::clippingRootForPainting const): >+ (WebCore::RenderLayer::clipToRect): >+ (WebCore::RenderLayer::paintLayer): >+ (WebCore::RenderLayer::calculateClipRects const): >+ (WebCore::outputPaintOrderTreeLegend): >+ (WebCore::outputPaintOrderTreeRecursive): >+ (WebCore::inContainingBlockChain): Deleted. >+ * rendering/RenderLayer.h: >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::willBeDestroyed): >+ (WebCore::RenderLayerBacking::appendSharingLayer): >+ (WebCore::RenderLayerBacking::removeSharingLayer): >+ (WebCore::RenderLayerBacking::clearSharingLayers): >+ (WebCore::RenderLayerBacking::updateCompositedBounds): >+ (WebCore::RenderLayerBacking::updateDrawsContent): >+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const): >+ (WebCore::RenderLayerBacking::paintIntoLayer): >+ (WebCore::RenderLayerBacking::paintContents): >+ * rendering/RenderLayerBacking.h: >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::CompositingState::CompositingState): >+ (WebCore::sharedLayerCanIncludeLayer): >+ (WebCore::RenderLayerCompositor::computeCompositingRequirements): >+ (WebCore::RenderLayerCompositor::layerWillBeRemoved): >+ (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const): >+ * rendering/RenderLayerCompositor.h: >+ >+2019-05-03 Simon Fraser <simon.fraser@apple.com> >+ >+ [macOS] Fix programmatic scrolling with async overflow scroll >+ https://bugs.webkit.org/show_bug.cgi?id=197590 >+ >+ Reviewed by Sam Weinig. >+ >+ ScrollingTreeOverflowScrollingNodeMac needs to handle RequestedScrollPosition. >+ >+ Tests: scrollingcoordinator/mac/programmatic-frame-scroll.html >+ scrollingcoordinator/mac/programmatic-overflow-scroll.html >+ >+ * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: >+ (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren): >+ > 2019-05-03 Zalan Bujtas <zalan@apple.com> > > [iOS] outlook.live.com: Compose email frame not fully visible and not scrollable >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >index 5b43a1804bb760b90917f74bb164db252874a545..208a45bd628bb8590c1e1f0792eb0564e7d008e8 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >@@ -57,8 +57,13 @@ void ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren(const Scro > void ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren(const ScrollingStateNode& stateNode) > { > ScrollingTreeOverflowScrollingNode::commitStateAfterChildren(stateNode); >- >- // FIXME: RequestedScrollPosition etc. >+ >+ const auto& overflowStateNode = downcast<ScrollingStateOverflowScrollingNode>(stateNode); >+ >+ if (overflowStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) { >+ auto scrollType = overflowStateNode.requestedScrollPositionRepresentsProgrammaticScroll() ? ScrollType::Programmatic : ScrollType::User; >+ scrollTo(overflowStateNode.requestedScrollPosition(), scrollType); >+ } > } > > ScrollingEventResult ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent(const PlatformWheelEvent& wheelEvent) >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 21c28c30c1df43a92837f454815867eabbdb26d4..8756091d4ab06a534bc68d20db9452662d07303c 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -351,6 +351,8 @@ RenderLayer::RenderLayer(RenderLayerModelObject& rendererLayerModelObject) > > RenderLayer::~RenderLayer() > { >+ WTFLogAlways("RenderLayer %p dtor", this); >+ > if (inResizeMode()) > renderer().frame().eventHandler().resizeLayerDestroyed(); > >@@ -379,6 +381,12 @@ RenderLayer::~RenderLayer() > > clearLayerFilters(); > >+ if (paintsIntoProvidedBacking()) { >+ auto* backingProviderLayer = this->backingProviderLayer(); >+ if (backingProviderLayer->backing()) >+ backingProviderLayer->backing()->removeBackingSharingLayer(*this); >+ } >+ > // Child layers will be deleted by their corresponding render objects, so > // we don't need to delete them ourselves. > >@@ -1676,6 +1684,23 @@ static inline bool isContainerForPositioned(RenderLayer& layer, PositionType pos > } > } > >+bool RenderLayer::ancestorLayerIsInContainingBlockChain(const RenderLayer& ancestor, const RenderLayer* checkLimit) const >+{ >+ if (&ancestor == this) >+ return true; >+ >+ for (const auto* currentBlock = renderer().containingBlock(); currentBlock && !is<RenderView>(*currentBlock); currentBlock = currentBlock->containingBlock()) { >+ auto* currLayer = currentBlock->layer(); >+ if (currLayer == &ancestor) >+ return true; >+ >+ if (currLayer && currLayer == checkLimit) >+ return false; >+ } >+ >+ return false; >+} >+ > RenderLayer* RenderLayer::enclosingAncestorForPosition(PositionType position) const > { > RenderLayer* curr = parent(); >@@ -1779,12 +1804,23 @@ RenderLayer* RenderLayer::enclosingCompositingLayer(IncludeSelfOrNot includeSelf > > RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(IncludeSelfOrNot includeSelf) const > { >- if (includeSelf == IncludeSelf && compositedWithOwnBackingStore(*this)) >- return const_cast<RenderLayer*>(this); >+ auto repaintTargetForLayer = [](const RenderLayer& layer) -> RenderLayer* { >+ if (compositedWithOwnBackingStore(layer)) >+ return const_cast<RenderLayer*>(&layer); >+ >+ if (layer.paintsIntoProvidedBacking()) >+ return layer.backingProviderLayer(); >+ >+ return nullptr; >+ }; >+ >+ RenderLayer* repaintTarget = nullptr; >+ if (includeSelf == IncludeSelf && (repaintTarget = repaintTargetForLayer(*this))) >+ return repaintTarget; > > for (const RenderLayer* curr = paintOrderParent(); curr; curr = curr->paintOrderParent()) { >- if (compositedWithOwnBackingStore(*curr)) >- return const_cast<RenderLayer*>(curr); >+ if ((repaintTarget = repaintTargetForLayer(*curr))) >+ return repaintTarget; > } > > return nullptr; >@@ -1866,6 +1902,9 @@ RenderLayer* RenderLayer::clippingRootForPainting() const > if (isComposited()) > return const_cast<RenderLayer*>(this); > >+ if (paintsIntoProvidedBacking()) >+ return backingProviderLayer(); >+ > const RenderLayer* current = this; > while (current) { > if (current->isRenderViewLayer()) >@@ -3941,18 +3980,6 @@ void RenderLayer::paintOverlayScrollbars(GraphicsContext& context, const LayoutR > m_containsDirtyOverlayScrollbars = false; > } > >-static bool inContainingBlockChain(RenderLayer* startLayer, RenderLayer* endLayer) >-{ >- if (startLayer == endLayer) >- return true; >- for (const auto* currentBlock = startLayer->renderer().containingBlock(); currentBlock && !is<RenderView>(*currentBlock); currentBlock = currentBlock->containingBlock()) { >- if (currentBlock->layer() == endLayer) >- return true; >- } >- >- return false; >-} >- > void RenderLayer::clipToRect(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, const ClipRect& clipRect, BorderRadiusClippingRule rule) > { > float deviceScaleFactor = renderer().document().deviceScaleFactor(); >@@ -3971,7 +3998,7 @@ void RenderLayer::clipToRect(GraphicsContext& context, const LayerPaintingInfo& > // any layers with overflow. The condition for being able to apply these clips is that the overflow object be in our > // containing block chain so we check that also. > for (RenderLayer* layer = rule == IncludeSelfForBorderRadius ? this : parent(); layer; layer = layer->parent()) { >- if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && inContainingBlockChain(this, layer)) { >+ if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && ancestorLayerIsInContainingBlockChain(*layer)) { > LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer, AdjustForColumns)), layer->size()); > adjustedClipRect.move(paintingInfo.subpixelOffset); > FloatRoundedRect roundedRect = layer->renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor); >@@ -4033,19 +4060,31 @@ static inline bool paintForFixedRootBackground(const RenderLayer* layer, OptionS > > void RenderLayer::paintLayer(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, OptionSet<PaintLayerFlag> paintFlags) > { >- if (isComposited()) { >- // The performingPaintInvalidation() painting pass goes through compositing layers, >- // but we need to ensure that we don't cache clip rects computed with the wrong root in this case. >- if (context.performingPaintInvalidation() || (paintingInfo.paintBehavior & PaintBehavior::FlattenCompositingLayers)) >- paintFlags.add(PaintLayerTemporaryClipRects); >- else if (!backing()->paintsIntoWindow() >- && !backing()->paintsIntoCompositedAncestor() >- && !shouldDoSoftwarePaint(this, paintFlags.contains(PaintLayerPaintingReflection)) >- && !paintForFixedRootBackground(this, paintFlags)) { >- // If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer(). >+ auto shouldContinuePaint = [&] () { >+ return backing()->paintsIntoWindow() >+ || backing()->paintsIntoCompositedAncestor() >+ || shouldDoSoftwarePaint(this, paintFlags.contains(PaintLayerPaintingReflection)) >+ || paintForFixedRootBackground(this, paintFlags); >+ }; >+ >+ auto paintsIntoDifferentCompositedDestination = [&]() { >+ if (paintsIntoProvidedBacking()) >+ return true; >+ >+ if (isComposited() && !shouldContinuePaint()) >+ return true; >+ >+ return false; >+ }; >+ >+ if (paintsIntoDifferentCompositedDestination()) { >+ if (!context.performingPaintInvalidation() && !(paintingInfo.paintBehavior & PaintBehavior::FlattenCompositingLayers)) > return; >- } >- } else if (viewportConstrainedNotCompositedReason() == NotCompositedForBoundsOutOfView) { >+ >+ paintFlags.add(PaintLayerTemporaryClipRects); >+ } >+ >+ if (viewportConstrainedNotCompositedReason() == NotCompositedForBoundsOutOfView) { > // Don't paint out-of-view viewport constrained layers (when doing prepainting) because they will never be visible > // unless their position or viewport size is changed. > ASSERT(renderer().isFixedPositioned()); >@@ -4058,7 +4097,7 @@ void RenderLayer::paintLayer(GraphicsContext& context, const LayerPaintingInfo& > > if (shouldSuppressPaintingLayer(this)) > return; >- >+ > // If this layer is totally invisible then there is nothing to paint. > if (!renderer().opacity()) > return; >@@ -5542,17 +5581,24 @@ void RenderLayer::calculateClipRects(const ClipRectsContext& clipRectsContext, C > } > } > >- LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " calculateClipRects " << clipRects); >+ LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " calculateClipRects - context " << clipRectsContext << ", result " << clipRects); > } > > Ref<ClipRects> RenderLayer::parentClipRects(const ClipRectsContext& clipRectsContext) const > { > ASSERT(parent()); > >- if (clipRectsContext.clipRectsType == TemporaryClipRects) { >+ auto calculateTemporaryClipRects = [&] () { >+ ClipRectsContext tempClipRectsContext(clipRectsContext.rootLayer, TemporaryClipRects, clipRectsContext.overlayScrollbarSizeRelevancy, clipRectsContext.respectOverflowClip); > auto parentClipRects = ClipRects::create(); > parent()->calculateClipRects(clipRectsContext, parentClipRects); > return parentClipRects; >+ }; >+ >+ if (clipRectsContext.clipRectsType == TemporaryClipRects >+ || parent()->enclosingPaginationLayer(IncludeCompositedPaginatedLayers) != enclosingPaginationLayer(IncludeCompositedPaginatedLayers) >+ || parent()->enclosingCompositingLayerForRepaint() != enclosingCompositingLayerForRepaint()) { >+ return calculateTemporaryClipRects(); > } > > return parent()->updateClipRects(clipRectsContext); >@@ -5572,21 +5618,7 @@ static inline ClipRect backgroundClipRectForPosition(const ClipRects& parentRect > ClipRect RenderLayer::backgroundClipRect(const ClipRectsContext& clipRectsContext) const > { > ASSERT(parent()); >- auto computeParentRects = [&] { >- if (clipRectsContext.clipRectsType == TemporaryClipRects) >- return parentClipRects(clipRectsContext); >- // If we cross into a different composition/pagination context, then we can't rely on the cache since the root layer differs. >- bool crossesPaginationBoundary = parent()->enclosingPaginationLayer(IncludeCompositedPaginatedLayers) != enclosingPaginationLayer(IncludeCompositedPaginatedLayers); >- bool crossesCompositingBoundary = parent()->enclosingCompositingLayerForRepaint() != enclosingCompositingLayerForRepaint(); >- if (!crossesPaginationBoundary && !crossesCompositingBoundary) >- return parentClipRects(clipRectsContext); >- >- ClipRectsContext tempContext(clipRectsContext); >- tempContext.clipRectsType = TemporaryClipRects; >- return parentClipRects(tempContext); >- }; >- >- auto parentRects = computeParentRects(); >+ auto parentRects = parentClipRects(clipRectsContext); > ClipRect backgroundClipRect = backgroundClipRectForPosition(parentRects, renderer().style().position()); > RenderView& view = renderer().view(); > // Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite. >@@ -6832,7 +6864,7 @@ void showLayerTree(const WebCore::RenderObject* renderer) > static void outputPaintOrderTreeLegend(TextStream& stream) > { > stream.nextLine(); >- stream << "(S)tacking Context/(F)orced SC/O(P)portunistic SC, (N)ormal flow only, (O)verflow clip, (A)lpha (opacity or mask), has (B)lend mode, (I)solates blending, (T)ransform-ish, (F)ilter, Fi(X)ed position, (C)omposited, (c)omposited descendant, (s)scrolling ancestor\n" >+ stream << "(S)tacking Context/(F)orced SC/O(P)portunistic SC, (N)ormal flow only, (O)verflow clip, (A)lpha (opacity or mask), has (B)lend mode, (I)solates blending, (T)ransform-ish, (F)ilter, Fi(X)ed position, (C)omposited, (P)rovides backing/uses (p)rovided backing, (c)omposited descendant, (s)scrolling ancestor\n" > "Dirty (z)-lists, Dirty (n)ormal flow lists\n" > "Traversal needs: requirements (t)raversal on descendants, (b)acking or hierarchy traversal on descendants, (r)equirements traversal on all descendants, requirements traversal on all (s)ubsequent layers, (h)ierarchy traversal on all descendants, update of paint (o)rder children\n" > "Update needs: post-(l)ayout requirements, (g)eometry, (k)ids geometry, (c)onfig, layer conne(x)ion, (s)crolling tree\n"; >@@ -6858,6 +6890,7 @@ static void outputPaintOrderTreeRecursive(TextStream& stream, const WebCore::Ren > stream << (layer.hasFilter() ? "F" : "-"); > stream << (layer.renderer().isFixedPositioned() ? "X" : "-"); > stream << (layer.isComposited() ? "C" : "-"); >+ stream << ((layer.isComposited() && layer.backing()->hasBackingSharingLayers()) ? "P" : (layer.paintsIntoProvidedBacking() ? "p" : "-")); > stream << (layer.hasCompositingDescendant() ? "c" : "-"); > stream << (layer.hasCompositedScrollingAncestor() ? "s" : "-"); > >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index fee5060c783ca8e73be37759df57c9777c41f03c..e16aa5a99f6869b6847f3e1f6f24051cd593c38b 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -603,6 +603,8 @@ public: > // Part of the issue is with subtree relayout: we don't check if our ancestors have some descendant flags dirty, missing some updates. > bool hasSelfPaintingLayerDescendant() const { return m_hasSelfPaintingLayerDescendant; } > >+ bool ancestorLayerIsInContainingBlockChain(const RenderLayer& ancestor, const RenderLayer* checkLimit = nullptr) const; >+ > // Gets the nearest enclosing positioned ancestor layer (also includes > // the <html> layer and the root layer). > RenderLayer* enclosingAncestorForPosition(PositionType) const; >@@ -813,6 +815,12 @@ public: > bool hasCompositingDescendant() const { return m_hasCompositingDescendant; } > bool hasCompositedMask() const; > >+ // If non-null, a non-ancestor composited layer that this layer paints into (it is sharing its backing store with this layer). >+ RenderLayer* backingProviderLayer() const { return m_backingProviderLayer.get(); } >+ void setBackingProviderLayer(RenderLayer* backingProvider) { m_backingProviderLayer = makeWeakPtr(backingProvider); } >+ >+ bool paintsIntoProvidedBacking() const { return !!m_backingProviderLayer; } >+ > RenderLayerBacking* backing() const { return m_backing.get(); } > RenderLayerBacking* ensureBacking(); > void clearBacking(bool layerBeingDestroyed = false); >@@ -1257,6 +1265,8 @@ private: > RenderLayer* m_first { nullptr }; > RenderLayer* m_last { nullptr }; > >+ WeakPtr<RenderLayer> m_backingProviderLayer; >+ > // For layers that establish stacking contexts, m_posZOrderList holds a sorted list of all the > // descendant layers within the stacking context that have z-indices of 0 or greater > // (auto will count as 0). m_negZOrderList holds descendants within our stacking context with negative >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index 1921292fb7d28603ecd0f8e8c9e53610c35dba6b..e81f9bb4302988adfd0850b7b9dbc6051d671f00 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -259,6 +259,10 @@ void RenderLayerBacking::willBeDestroyed() > { > ASSERT(m_owningLayer.backing() == this); > compositor().removeFromScrollCoordinatedLayers(m_owningLayer); >+ >+ LOG(Compositing, "RenderLayer(backing) %p willBeDestroyed", &m_owningLayer); >+ >+ clearBackingSharingLayers(); > } > > void RenderLayerBacking::willDestroyLayer(const GraphicsLayer* layer) >@@ -267,6 +271,37 @@ void RenderLayerBacking::willDestroyLayer(const GraphicsLayer* layer) > compositor().layerTiledBackingUsageChanged(layer, false); > } > >+void RenderLayerBacking::appendBackingSharingLayer(RenderLayer& layer) >+{ >+ LOG(Compositing, "RenderLayer %p appendBackingSharingLayer %p", &m_owningLayer, &layer); >+ >+ layer.setBackingProviderLayer(&m_owningLayer); >+ layer.clearClipRectsIncludingDescendants(PaintingClipRects); >+ m_backingSharingLayers.append(makeWeakPtr(&layer)); >+} >+ >+void RenderLayerBacking::removeBackingSharingLayer(RenderLayer& layer) >+{ >+ LOG(Compositing, "RenderLayer %p removeBackingSharingLayer %p", &m_owningLayer, &layer); >+ >+ layer.setBackingProviderLayer(nullptr); >+ layer.clearClipRectsIncludingDescendants(PaintingClipRects); >+ m_backingSharingLayers.removeAll(&layer); >+} >+ >+void RenderLayerBacking::clearBackingSharingLayers() >+{ >+ LOG(Compositing, "RenderLayer %p clearBackingSharingLayers", &m_owningLayer); >+ >+ for (auto& layerWeakPtr : m_backingSharingLayers) { >+ if (!layerWeakPtr) >+ continue; >+ layerWeakPtr->setBackingProviderLayer(nullptr); >+ } >+ >+ m_backingSharingLayers.clear(); >+} >+ > Ref<GraphicsLayer> RenderLayerBacking::createGraphicsLayer(const String& name, GraphicsLayer::Type layerType) > { > auto* graphicsLayerFactory = renderer().page().chrome().client().graphicsLayerFactory(); >@@ -606,7 +641,7 @@ static bool hasNonZeroTransformOrigin(const RenderObject& renderer) > > bool RenderLayerBacking::updateCompositedBounds() > { >- LayoutRect layerBounds = m_owningLayer.calculateLayerBounds(&m_owningLayer, LayoutSize(), RenderLayer::defaultCalculateLayerBoundsFlags() | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask); >+ LayoutRect layerBounds = m_owningLayer.calculateLayerBounds(&m_owningLayer, { }, RenderLayer::defaultCalculateLayerBoundsFlags() | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask); > // Clip to the size of the document or enclosing overflow-scroll layer. > // 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. >@@ -628,7 +663,20 @@ bool RenderLayerBacking::updateCompositedBounds() > > layerBounds.intersect(clippingBounds); > } >- >+ >+ for (auto& layerWeakPtr : m_backingSharingLayers) { >+ if (!layerWeakPtr) { >+ ASSERT_NOT_REACHED(); >+ continue; >+ } >+ >+ auto* boundsRootLayer = &m_owningLayer; >+ ASSERT(layerWeakPtr->isDescendantOf(m_owningLayer)); >+ auto offset = layerWeakPtr->offsetFromAncestor(&m_owningLayer); >+ auto bounds = layerWeakPtr->calculateLayerBounds(boundsRootLayer, offset, RenderLayer::defaultCalculateLayerBoundsFlags() | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask); >+ layerBounds.unite(bounds); >+ } >+ > // If the element has a transform-origin that has fixed lengths, and the renderer has zero size, > // then we need to ensure that the compositing layer has non-zero size so that we can apply > // the transform-origin via the GraphicsLayer anchorPoint (which is expressed as a fractional value). >@@ -1397,7 +1445,7 @@ void RenderLayerBacking::updateDrawsContent(PaintedContentsInfo& contentsInfo) > bool hasNonScrollingPaintedContent = m_owningLayer.hasVisibleContent() && m_owningLayer.hasVisibleBoxDecorationsOrBackground(); > m_graphicsLayer->setDrawsContent(hasNonScrollingPaintedContent); > >- bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || contentsInfo.paintsContent()); >+ bool hasScrollingPaintedContent = hasBackingSharingLayers() || (m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || contentsInfo.paintsContent())); > m_scrolledContentsLayer->setDrawsContent(hasScrollingPaintedContent); > return; > } >@@ -2133,6 +2181,9 @@ bool RenderLayerBacking::isSimpleContainerCompositingLayer(PaintedContentsInfo& > if (m_owningLayer.isRenderViewLayer()) > return false; > >+ if (hasBackingSharingLayers()) >+ return false; >+ > if (renderer().isRenderReplaced() && (!isCompositedPlugin(renderer()) || isRestartedPlugin(renderer()))) > return false; > >@@ -2603,23 +2654,51 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap > RenderElement::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(&renderer()); > #endif > >- FrameView::PaintingState paintingState; >- if (m_owningLayer.isRenderViewLayer()) >- renderer().view().frameView().willPaintContents(context, paintDirtyRect, paintingState); >+ auto paintOneLayer = [&](RenderLayer& layer, OptionSet<RenderLayer::PaintLayerFlag> paintFlags) { >+ InspectorInstrumentation::willPaint(layer.renderer()); > >- RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer); >+ FrameView::PaintingState paintingState; >+ if (layer.isRenderViewLayer()) >+ renderer().view().frameView().willPaintContents(context, paintDirtyRect, paintingState); > >- m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags); >+ RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer); > >- if (m_owningLayer.containsDirtyOverlayScrollbars()) >- m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars); >+ layer.paintLayerContents(context, paintingInfo, paintFlags); > >- if (m_owningLayer.isRenderViewLayer()) >- renderer().view().frameView().didPaintContents(context, paintDirtyRect, paintingState); >+ if (layer.containsDirtyOverlayScrollbars()) >+ layer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars); > >- compositor().didPaintBacking(this); >+ if (layer.isRenderViewLayer()) >+ renderer().view().frameView().didPaintContents(context, paintDirtyRect, paintingState); >+ >+ ASSERT(!m_owningLayer.m_usedTransparency); >+ >+ InspectorInstrumentation::didPaint(layer.renderer(), paintDirtyRect); >+ }; > >- ASSERT(!m_owningLayer.m_usedTransparency); >+ paintOneLayer(m_owningLayer, paintFlags); >+ >+ // FIXME: Need to check m_foregroundLayer, masking etc. webkit.org/b/197565. >+ GraphicsLayer* destinationForSharingLayers = m_scrolledContentsLayer ? m_scrolledContentsLayer.get() : m_graphicsLayer.get(); >+ >+ if (graphicsLayer == destinationForSharingLayers) { >+ OptionSet<RenderLayer::PaintLayerFlag> sharingLayerPaintFlags = { >+ RenderLayer::PaintLayerPaintingCompositingBackgroundPhase, >+ RenderLayer::PaintLayerPaintingCompositingForegroundPhase }; >+ >+ if (paintingPhase & GraphicsLayerPaintOverflowContents) >+ sharingLayerPaintFlags.add(RenderLayer::PaintLayerPaintingOverflowContents); >+ >+ for (auto& layerWeakPtr : m_backingSharingLayers) { >+ if (!layerWeakPtr) { >+ ASSERT_NOT_REACHED(); >+ continue; >+ } >+ paintOneLayer(*layerWeakPtr, sharingLayerPaintFlags); >+ } >+ } >+ >+ compositor().didPaintBacking(this); > } > > // Up-call from compositing layer drawing callback. >@@ -2647,7 +2726,6 @@ void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, Graph > || graphicsLayer == m_maskLayer.get() > || graphicsLayer == m_childClippingMaskLayer.get() > || graphicsLayer == m_scrolledContentsLayer.get()) { >- InspectorInstrumentation::willPaint(renderer()); > > if (!(paintingPhase & GraphicsLayerPaintOverflowContents)) > dirtyRect.intersect(enclosingIntRect(compositedBoundsIncludingMargin())); >@@ -2661,21 +2739,18 @@ void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, Graph > behavior.add(PaintBehavior::TileFirstPaint); > > paintIntoLayer(graphicsLayer, context, dirtyRect, behavior, paintingPhase); >- >- InspectorInstrumentation::didPaint(renderer(), dirtyRect); > } else if (graphicsLayer == layerForHorizontalScrollbar()) { > paintScrollbar(m_owningLayer.horizontalScrollbar(), context, dirtyRect); > } else if (graphicsLayer == layerForVerticalScrollbar()) { > paintScrollbar(m_owningLayer.verticalScrollbar(), context, dirtyRect); > } else if (graphicsLayer == layerForScrollCorner()) { > const LayoutRect& scrollCornerAndResizer = m_owningLayer.scrollCornerAndResizerRect(); >- context.save(); >+ GraphicsContextStateSaver stateSaver(context); > context.translate(-scrollCornerAndResizer.location()); > LayoutRect transformedClip = LayoutRect(clip); > transformedClip.moveBy(scrollCornerAndResizer.location()); > m_owningLayer.paintScrollCorner(context, IntPoint(), snappedIntRect(transformedClip)); > m_owningLayer.paintResizer(context, IntPoint(), transformedClip); >- context.restore(); > } > #ifndef NDEBUG > renderer().page().setIsPainting(false); >diff --git a/Source/WebCore/rendering/RenderLayerBacking.h b/Source/WebCore/rendering/RenderLayerBacking.h >index 4c57146ed3d6167e9550282984c365fe7d3f59a2..bdfaca644527bfc83415ca32ae6c66fe13b92b15 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.h >+++ b/Source/WebCore/rendering/RenderLayerBacking.h >@@ -69,6 +69,14 @@ public: > > RenderLayer& owningLayer() const { return m_owningLayer; } > >+ // Included layers are non-z-order descendant layers that are painted into this backing. >+ const Vector<WeakPtr<RenderLayer>>& backingSharingLayers() const { return m_backingSharingLayers; } >+ bool hasBackingSharingLayers() const { return !m_backingSharingLayers.isEmpty(); } >+ >+ void appendBackingSharingLayer(RenderLayer&); >+ void removeBackingSharingLayer(RenderLayer&); >+ void clearBackingSharingLayers(); >+ > void updateConfigurationAfterStyleChange(); > > // Returns true if layer configuration changed. >@@ -387,6 +395,9 @@ private: > > RenderLayer& m_owningLayer; > >+ // A list other layers that paint into this backing store, later than m_owningLayer in paint order. >+ Vector<WeakPtr<RenderLayer>> m_backingSharingLayers; >+ > RefPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clipped by an ancestor which is not a stacking context. > RefPtr<GraphicsLayer> m_contentsContainmentLayer; // Only used if we have a background layer; takes the transform. > RefPtr<GraphicsLayer> m_graphicsLayer; >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 0306e0cfae2ad0dcf991dcb1c87eff131fdae224..5c8a7ea0245f8a5bbf87a6c2d7d2e2bfc26d965a 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -234,6 +234,7 @@ struct RenderLayerCompositor::CompositingState { > > CompositingState(const CompositingState& other) > : compositingAncestor(other.compositingAncestor) >+ , backingProviderCandidate(other.backingProviderCandidate) > , subtreeIsCompositing(other.subtreeIsCompositing) > , testingOverlap(other.testingOverlap) > , fullPaintOrderTraversalRequired(other.fullPaintOrderTraversalRequired) >@@ -249,6 +250,7 @@ struct RenderLayerCompositor::CompositingState { > } > > RenderLayer* compositingAncestor; >+ RenderLayer* backingProviderCandidate { nullptr }; > bool subtreeIsCompositing { false }; > bool testingOverlap { true }; > bool fullPaintOrderTraversalRequired { false }; >@@ -821,15 +823,24 @@ bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update > return true; > } > >+static bool backingProviderLayerCanIncludeLayer(const RenderLayer& sharedLayer, const RenderLayer& layer) >+{ >+ return layer.ancestorLayerIsInContainingBlockChain(sharedLayer); >+} >+ > void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap& overlapMap, CompositingState& compositingState, bool& descendantHas3DTransform) > { >- if (!layer.hasDescendantNeedingCompositingRequirementsTraversal() && !layer.needsCompositingRequirementsTraversal() && !compositingState.fullPaintOrderTraversalRequired && !compositingState.descendantsRequireCompositingUpdate) { >+ if (layer.isStackingContext() && !compositingState.backingProviderCandidate >+ && !layer.hasDescendantNeedingCompositingRequirementsTraversal() >+ && !layer.needsCompositingRequirementsTraversal() >+ && !compositingState.fullPaintOrderTraversalRequired >+ && !compositingState.descendantsRequireCompositingUpdate) { > traverseUnchangedSubtree(ancestorLayer, layer, overlapMap, compositingState, descendantHas3DTransform); > return; > } > > #if ENABLE(TREE_DEBUGGING) >- LOG(Compositing, "%*p computeCompositingRequirements", 12 + compositingState.depth * 2, &layer); >+ LOG(Compositing, "%*p %s computeCompositingRequirements (backing provider candidate %p)", 12 + compositingState.depth * 2, &layer, layer.isNormalFlowOnly() ? "n" : "s", compositingState.backingProviderCandidate); > #endif > > // FIXME: maybe we can avoid updating all remaining layers in paint order. >@@ -840,6 +851,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > layer.updateLayerListsIfNeeded(); > > layer.setHasCompositingDescendant(false); >+ layer.setBackingProviderLayer(nullptr); > > // We updated compositing for direct reasons in layerStyleChanged(). Here, check for compositing that can only be evaluated after layout. > RequiresCompositingData queryData; >@@ -865,8 +877,19 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > // If we know for sure the layer is going to be composited, don't bother looking it up in the overlap map > if (!willBeComposited && !overlapMap.isEmpty() && compositingState.testingOverlap) { > computeExtent(overlapMap, layer, layerExtent); >+ > // If we're testing for overlap, we only need to composite if we overlap something that is already composited. >- compositingReason = overlapMap.overlapsLayers(layerExtent.bounds) ? RenderLayer::IndirectCompositingReason::Overlap : RenderLayer::IndirectCompositingReason::None; >+ if (overlapMap.overlapsLayers(layerExtent.bounds)) { >+ if (compositingState.backingProviderCandidate && backingProviderLayerCanIncludeLayer(*compositingState.backingProviderCandidate, layer)) { >+ compositingState.backingProviderCandidate->backing()->appendBackingSharingLayer(layer); >+ compositingReason = RenderLayer::IndirectCompositingReason::None; >+ } else { >+ // Overlap that can't be done with shared layers disables shared layers for later siblings. >+ compositingReason = RenderLayer::IndirectCompositingReason::Overlap; >+ compositingState.backingProviderCandidate = nullptr; >+ } >+ } else >+ compositingReason = RenderLayer::IndirectCompositingReason::None; > } > > #if ENABLE(VIDEO) >@@ -890,6 +913,8 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > // ancestor with subtreeIsCompositing set to false. > CompositingState childState(compositingState); > childState.subtreeIsCompositing = false; >+ childState.backingProviderCandidate = layer.isStackingContext() ? nullptr : compositingState.backingProviderCandidate; >+ > #if ENABLE(CSS_COMPOSITING) > childState.hasNotIsolatedCompositedBlendingDescendants = false; > #endif >@@ -916,7 +941,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > #endif > > bool anyDescendantHas3DTransform = false; >- >+ > for (auto* childLayer : layer.negativeZOrderLayers()) { > computeCompositingRequirements(&layer, *childLayer, overlapMap, childState, anyDescendantHas3DTransform); > >@@ -961,7 +986,8 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > // Now check for reasons to become composited that depend on the state of descendant layers. > RenderLayer::IndirectCompositingReason indirectCompositingReason; > if (!willBeComposited && canBeComposited(layer) >- && requiresCompositingForIndirectReason(layer.renderer(), compositingState.compositingAncestor, childState.subtreeIsCompositing, anyDescendantHas3DTransform, indirectCompositingReason)) { >+ && requiresCompositingForIndirectReason(layer, compositingState.compositingAncestor, childState.subtreeIsCompositing, anyDescendantHas3DTransform, indirectCompositingReason)) { >+ > layer.setIndirectCompositingReason(indirectCompositingReason); > childState.compositingAncestor = &layer; > childState.subtreeIsCompositing = true; >@@ -1033,6 +1059,13 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > layer.setNeedsCompositingGeometryUpdateOnAncestors(); > } > >+ if (childState.backingProviderCandidate) >+ compositingState.backingProviderCandidate = childState.backingProviderCandidate; >+ else if (willBeComposited) { >+ compositingState.backingProviderCandidate = &layer; >+ layer.backing()->clearBackingSharingLayers(); >+ } >+ > if (layer.reflectionLayer() && updateLayerCompositingState(*layer.reflectionLayer(), queryData, CompositingChangeRepaintNow)) > layer.setNeedsCompositingLayerConnection(); > >@@ -1045,7 +1078,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > } > > #if ENABLE(TREE_DEBUGGING) >- LOG(Compositing, "%*p computeCompositingRequirements - willBeComposited %d", 12 + compositingState.depth * 2, &layer, willBeComposited); >+ LOG(Compositing, "%*p computeCompositingRequirements - willBeComposited %d (backing provider candidate %p)", 12 + compositingState.depth * 2, &layer, willBeComposited, compositingState.backingProviderCandidate); > #endif > > layer.clearCompositingRequirementsTraversalState(); >@@ -1727,10 +1760,18 @@ void RenderLayerCompositor::layerWasAdded(RenderLayer&, RenderLayer&) > > void RenderLayerCompositor::layerWillBeRemoved(RenderLayer& parent, RenderLayer& child) > { >- if (!child.isComposited() || parent.renderer().renderTreeBeingDestroyed()) >+ if (parent.renderer().renderTreeBeingDestroyed()) > return; > >- repaintInCompositedAncestor(child, child.backing()->compositedBounds()); // FIXME: do via dirty bits? >+ if (child.isComposited()) >+ repaintInCompositedAncestor(child, child.backing()->compositedBounds()); // FIXME: do via dirty bits? >+ else if (child.paintsIntoProvidedBacking()) { >+ auto* backingProviderLayer = child.backingProviderLayer(); >+ // FIXME: Optimize this repaint. >+ backingProviderLayer->setBackingNeedsRepaint(); >+ backingProviderLayer->backing()->removeBackingSharingLayer(child); >+ } else >+ return; > > child.setNeedsCompositingLayerConnection(); > } >@@ -2793,12 +2834,11 @@ bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const Render > } > > // FIXME: why doesn't this handle the clipping cases? >-bool RenderLayerCompositor::requiresCompositingForIndirectReason(RenderLayerModelObject& renderer, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason& reason) const >+bool RenderLayerCompositor::requiresCompositingForIndirectReason(const RenderLayer& layer, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason& reason) const > { >- auto& layer = *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. >+ auto& renderer = layer.renderer(); > if (hasCompositedDescendants && (layer.isolatesCompositedBlending() || layer.transform() || renderer.createsGroup() || renderer.hasReflection())) { > reason = RenderLayer::IndirectCompositingReason::GraphicalEffect; > return true; >@@ -2818,7 +2858,7 @@ bool RenderLayerCompositor::requiresCompositingForIndirectReason(RenderLayerMode > } > } > >- if (renderer.isAbsolutelyPositioned() && compositingAncestor && layer.hasCompositedScrollingAncestor()) { >+ if (!layer.paintsIntoProvidedBacking() && renderer.isAbsolutelyPositioned() && compositingAncestor && layer.hasCompositedScrollingAncestor()) { > if (layerContainingBlockCrossesCoordinatedScrollingBoundary(layer, *compositingAncestor)) { > reason = RenderLayer::IndirectCompositingReason::OverflowScrollPositioning; > return true; >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h >index a5f94a0044065d17fb25b01badd04987f65c672d..b59de7a44fc9fead288b3e1230edd062fbbae43a 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.h >+++ b/Source/WebCore/rendering/RenderLayerCompositor.h >@@ -476,7 +476,7 @@ private: > bool requiresCompositingForPosition(RenderLayerModelObject&, const RenderLayer&, RequiresCompositingData&) const; > bool requiresCompositingForOverflowScrolling(const RenderLayer&, RequiresCompositingData&) const; > bool requiresCompositingForEditableImage(RenderLayerModelObject&) const; >- bool requiresCompositingForIndirectReason(RenderLayerModelObject&, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason&) const; >+ bool requiresCompositingForIndirectReason(const RenderLayer&, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason&) const; > > static bool layerContainingBlockCrossesCoordinatedScrollingBoundary(const RenderLayer&, const RenderLayer& compositedAncestor); > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index db50337bf1fc1eb2e63ba6da004d866925c7643d..7616e797f57a3f132b0699e231f23a858907e8b0 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,94 @@ >+2019-05-04 Simon Fraser <simon.fraser@apple.com> >+ >+ Implement "shared" compositing layers, allowing overlap layers to paint into the backing store of another layer >+ https://bugs.webkit.org/show_bug.cgi?id=197561 >+ <rdar://problem/50445998> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ New tests for layer sharing in compositing/shared-layers/. Other tests rebaselined, or adjusted to >+ ensure that layer sharing doesn't break the original intent of the test. >+ >+ * TestExpectations: >+ * compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: >+ * compositing/layer-creation/overflow-scroll-overlap-expected.txt: >+ * compositing/layer-creation/overflow-scroll-overlap.html: >+ * compositing/overflow/scrolling-content-clip-to-viewport.html: >+ * compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: >+ * compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller.html: Added. >+ * compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html: Added. >+ * compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html. >+ * compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness.html: Added. >+ * compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html: Added. >+ * compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html: Added. >+ * compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt. >+ * compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll.html: Added. >+ * compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt. >+ * compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content.html: Added. >+ * compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html: Added. >+ * compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip.html: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-clipping-expected.html: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-clipping.html: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds.html: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking.html: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-repaint-expected.txt: Added. >+ * compositing/shared-layers/overflow-scroll/shared-layer-repaint.html: Added. >+ * compositing/shared-layers/remove-sharing-layer-expected.txt: Added. >+ * compositing/shared-layers/remove-sharing-layer.html: Added. >+ * compositing/shared-layers/sharing-cached-clip-rects-expected.txt: Added. >+ * compositing/shared-layers/sharing-cached-clip-rects.html: Added. >+ * platform/ios-wk2/TestExpectations: >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Added. >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added. >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added. >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added. >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added. >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added. >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt. >+ * platform/ios-wk2/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt. >+ * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: >+ * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: >+ * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: >+ * platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: >+ * platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: >+ * platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: >+ * platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt: >+ * platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt: >+ * platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt: >+ * platform/mac-wk2/TestExpectations: >+ * platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: >+ * platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt: >+ * scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: >+ * scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html: >+ * scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: >+ * scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html: >+ * scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: >+ * scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html: >+ * scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: >+ * scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html: >+ >+2019-05-03 Simon Fraser <simon.fraser@apple.com> >+ >+ [macOS] Fix programmatic scrolling with async overflow scroll >+ https://bugs.webkit.org/show_bug.cgi?id=197590 >+ >+ Reviewed by Sam Weinig. >+ >+ Tests for programmatic scrolling of overflow and iframes. >+ >+ * scrollingcoordinator/mac/programmatic-frame-scroll-expected.html: Added. >+ * scrollingcoordinator/mac/programmatic-frame-scroll.html: Added. >+ * scrollingcoordinator/mac/programmatic-overflow-scroll-expected.html: Added. >+ * scrollingcoordinator/mac/programmatic-overflow-scroll.html: Added. >+ > 2019-05-03 Jiewen Tan <jiewen_tan@apple.com> > > [WebAuthN] A focused document should be required >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 101446844d438e28c51fc7166154999e569128ec..76dec5e42d98c1f0b4b71dfd4e7a94aa0d7d9374 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -59,6 +59,9 @@ editing/pasteboard/ios [ Skip ] > editing/pasteboard/mac [ Skip ] > fast/media/ios [ Skip ] > >+# Requires async overflow scrolling >+compositing/shared-layers/overflow-scroll [ Skip ] >+ > # WebKit2 only. > printing/printing-events.html [ Skip ] > >diff --git a/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt b/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt >index 76ce8cd00bdf87028afd60a4c20cfb381a551b60..8620e41c8ba7eaf4906da0de010136af49d86dc8 100644 >--- a/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt >+++ b/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt >@@ -11,7 +11,7 @@ middlebottom > (GraphicsLayer > (bounds 785.00 2618.00) > (contentsOpaque 1) >- (children 6 >+ (children 3 > (GraphicsLayer > (position 21.00 21.00) > (bounds 100.00 100.00) >@@ -21,31 +21,6 @@ middlebottom > (bounds 220.00 220.00) > (drawsContent 1) > ) >- (GraphicsLayer >- (offsetFromRenderer width=0 height=100) >- (position 28.00 20.00) >- (bounds 200.00 200.00) >- (children 1 >- (GraphicsLayer >- (offsetFromRenderer width=0 height=100) >- (bounds 110.00 200.00) >- (contentsOpaque 1) >- (drawsContent 1) >- ) >- ) >- ) >- (GraphicsLayer >- (offsetFromRenderer width=-5 height=-145) >- (position 28.00 20.00) >- (bounds 200.00 200.00) >- (children 1 >- (GraphicsLayer >- (position 5.00 145.00) >- (bounds 144.00 24.00) >- (drawsContent 1) >- ) >- ) >- ) > (GraphicsLayer > (offsetFromRenderer width=0 height=100) > (position 28.00 250.00) >@@ -53,20 +28,7 @@ middlebottom > (children 1 > (GraphicsLayer > (offsetFromRenderer width=0 height=100) >- (bounds 110.00 200.00) >- (contentsOpaque 1) >- (drawsContent 1) >- ) >- ) >- ) >- (GraphicsLayer >- (offsetFromRenderer width=-5 height=-145) >- (position 28.00 250.00) >- (bounds 185.00 200.00) >- (children 1 >- (GraphicsLayer >- (position 5.00 145.00) >- (bounds 144.00 24.00) >+ (bounds 149.00 200.00) > (drawsContent 1) > ) > ) >diff --git a/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt b/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt >index eb930f3bf94050a802fb453c1763d9f0589b6e1b..7aea48b43b13157de74d654902872a2b6eabadfd 100644 >--- a/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt >+++ b/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt >@@ -5,7 +5,7 @@ > (GraphicsLayer > (bounds 800.00 600.00) > (contentsOpaque 1) >- (children 3 >+ (children 2 > (GraphicsLayer > (position 8.00 8.00) > (bounds 30.00 30.00) >@@ -15,18 +15,6 @@ > (bounds 306.00 206.00) > (drawsContent 1) > ) >- (GraphicsLayer >- (offsetFromRenderer width=-20 height=-45) >- (position 23.00 23.00) >- (bounds 285.00 200.00) >- (children 1 >- (GraphicsLayer >- (position 20.00 45.00) >- (bounds 210.00 100.00) >- (contentsOpaque 1) >- ) >- ) >- ) > ) > ) > ) >diff --git a/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html b/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html >index 752cc5809b31d51792288be2ad2c430a2a78763b..3f5b27501a8f60eb38d680c16825311bbd1f9ed1 100644 >--- a/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html >+++ b/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html >@@ -52,7 +52,7 @@ > document.getElementById('results').innerText = window.internals.layerTreeAsText(document); > testRunner.notifyDone(); > } >- }, 150); >+ }, 0); > } > > window.addEventListener('load', doTest, false); >diff --git a/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html b/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html >index bf0e90a764fab13fab9afca708e7b1a5a5e6f9a5..1d85826124f1c5e0b8acdeda9c161250b5e15b60 100644 >--- a/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html >+++ b/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html >@@ -23,7 +23,7 @@ > height: 1200px; > background: silver; > border: 2px solid blue; >- z-index: 0; >+ transform: translateZ(0); > } > </style> > <script> >diff --git a/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt b/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt >index ae3319327b6c7f0288acb8979fa3881b8486d809..c70ede2616ee69470b1073b97b8ed4a5c45a4483 100644 >--- a/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt >+++ b/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt >@@ -6,7 +6,7 @@ > (GraphicsLayer > (bounds 800.00 600.00) > (contentsOpaque 1) >- (children 4 >+ (children 3 > (GraphicsLayer > (position 8.00 8.00) > (bounds 404.00 223.00) >@@ -29,18 +29,6 @@ > ) > ) > ) >- (GraphicsLayer >- (offsetFromRenderer width=-250 height=0) >- (position 10.00 10.00) >- (bounds 400.00 204.00) >- (children 1 >- (GraphicsLayer >- (position 250.00 0.00) >- (bounds 150.00 200.00) >- (contentsOpaque 1) >- ) >- ) >- ) > (GraphicsLayer > (offsetFromRenderer width=-96 height=0) > (position 10.00 10.00) >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..cd216b56587fe0588f06e7ccebacb309ec3968f8 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt >@@ -0,0 +1,47 @@ >+relativeabsolute >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 2 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 304.00 304.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 285.00 285.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 285.00 682.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (offsetFromRenderer width=-42 height=-152) >+ (position 30.00 22.00) >+ (bounds 285.00 285.00) >+ (children 1 >+ (GraphicsLayer >+ (position 42.00 152.00) >+ (bounds 150.00 150.00) >+ (contentsOpaque 1) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller.html b/LayoutTests/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b00d101fe50fc84903bfd294db7367d6a4af8364 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller.html >@@ -0,0 +1,59 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests sharing with absolute inside a stacking relative in overflow</title> >+ <style> >+ .scroller { >+ overflow: scroll; >+ height: 300px; >+ width: 300px; >+ border: 2px solid black; >+ margin: 20px; >+ } >+ >+ .relative { >+ position: relative; >+ border: 2px solid orange; >+ margin: 20px; >+ padding: 20px; >+ margin-top: 100px; >+ } >+ >+ .stacking { >+ z-index: 0; >+ } >+ >+ .absolute { >+ position: absolute; >+ top: 50px; >+ left: 20px; >+ height: 150px; >+ width: 150px; >+ background-color: silver; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="scroller"> >+ <div class="stacking relative"> >+ relative >+ <div class="absolute">absolute</div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..85d8ade647d1fbf1475a101f62d356b4e5363ec5 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt >@@ -0,0 +1,45 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 2 >+ (GraphicsLayer >+ (position 8.00 8.00) >+ (bounds 404.00 404.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 385.00 400.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 385.00 1044.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (offsetFromRenderer width=-34 height=-134) >+ (position 10.00 10.00) >+ (bounds 385.00 400.00) >+ (children 1 >+ (GraphicsLayer >+ (position 34.00 134.00) >+ (bounds 220.00 220.00) >+ (contentsOpaque 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html b/LayoutTests/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0ab0aeee352cfaa61cede6ccf953b40727df6a55 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html >@@ -0,0 +1,67 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .scroller { >+ overflow-x: hidden; >+ width: 400px; >+ height: 400px; >+ border: 2px solid black; >+ } >+ >+ .relative { >+ position: relative; >+ margin: 20px; >+ padding: 20px; >+ height: 200px; >+ border: 4px solid orange; >+ } >+ >+ .absolute { >+ position: absolute; >+ background-color: silver; >+ top: 10px; >+ left: 10px; >+ padding: 10px; >+ width: 200px; >+ height: 50px; >+ } >+ >+ .spacer { >+ height: 1000px; >+ } >+ >+ .composited { >+ transform: translateZ(0); >+ } >+ >+ .composited.absolute { >+ background-color: silver; >+ top: 100px; >+ left: 0; >+ width: 200px; >+ height: 200px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="scroller"> >+ <div class="relative"> >+ <div class="absolute"> >+ <div class="composited absolute"></div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..5c321929e2f8c3cfbaccfb66d154ccca47a3f32e >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt >@@ -0,0 +1,47 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 304.00 304.00) >+ (opacity 0.80) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 285.00 300.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 285.00 500.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (position 20.00 78.00) >+ (bounds 140.00 140.00) >+ (contentsOpaque 1) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (bounds 140.00 140.00) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html b/LayoutTests/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html >new file mode 100644 >index 0000000000000000000000000000000000000000..687ef9bfde168ce5b513d93e3298e1532f73a1e7 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html >@@ -0,0 +1,60 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .scroller { >+ margin: 20px; >+ width: 300px; >+ height: 300px; >+ overflow: auto; >+ border: 2px solid black; >+ opacity: 0.8; >+ } >+ >+ .absolute { >+ position: absolute; >+ width: 100px; >+ height: 100px; >+ top: 100px; >+ left: 50px; >+ padding: 20px; >+ background-color: silver; >+ } >+ >+ .clipping { >+ overflow: hidden; >+ } >+ >+ .inner { >+ top: 50px; >+ width: 100px; >+ height: 100px; >+ background-color: blue; >+ } >+ >+ .spacer { >+ height: 500px; >+ background-image: repeating-linear-gradient(white, silver 200px); >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="scroller"> >+ <div class="clipping absolute"> >+ <div class="absolute inner"></div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..2344046f38707b5d0079159c7921ea138760e8b0 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt >@@ -0,0 +1,62 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 3 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 320.00 320.00) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 300.00 300.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 281.00 296.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 281.00 364.00) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (position 110.00 110.00) >+ (bounds 100.00 100.00) >+ (contentsOpaque 1) >+ ) >+ (GraphicsLayer >+ (offsetFromRenderer width=-20 height=-20) >+ (position 42.00 34.00) >+ (bounds 281.00 296.00) >+ (children 1 >+ (GraphicsLayer >+ (position 20.00 20.00) >+ (bounds 241.00 24.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness.html b/LayoutTests/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness.html >new file mode 100644 >index 0000000000000000000000000000000000000000..4da38b4a4cd9495f78b40b1071e310c2f20cfed3 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness.html >@@ -0,0 +1,64 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .container { >+ width: 300px; >+ height: 300px; >+ border: 2px solid gray; >+ margin: 20px; >+ overflow-y: hidden; >+ padding: 10px; >+ } >+ >+ .scroller { >+ overflow-x: auto; >+ width: 100%; >+ height: 100%; >+ border: 2px solid black; >+ box-sizing: border-box; >+ } >+ >+ .relative { >+ position: relative; >+ padding: 10px; >+ margin: 20px; >+ border: 2px solid orange; >+ z-index: 0; >+ } >+ >+ .absolute { >+ position: absolute; >+ top: 100px; >+ left: 100px; >+ margin: 10px; >+ width: 100px; >+ height: 100px; >+ background-color: silver; >+ } >+ >+ .spacer { >+ height: 300px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="absolute"></div> >+ <div class="container"> >+ <div class="scroller"> >+ <div class="relative"></div> >+ <div class="spacer"></div> >+ </div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..d381099d80890704e86e3a6be71b7221bc54e437 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt >@@ -0,0 +1,47 @@ >+Text >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 320.00 320.00) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 300.00 300.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 281.00 296.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 281.00 466.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9157a6494ac7ea6b5cf3ddb5cf9992591714cb3a >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html >@@ -0,0 +1,63 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .container { >+ width: 300px; >+ height: 300px; >+ border: 2px solid gray; >+ margin: 20px; >+ padding: 10px; >+ overflow-y: hidden; >+ } >+ >+ .scroller { >+ overflow-x: auto; >+ width: 100%; >+ height: 100%; >+ border: 2px solid black; >+ box-sizing: border-box; >+ } >+ >+ .clipping { >+ overflow: hidden; >+ width: 200px; >+ border: 2px solid black; >+ margin: 50px 10px; >+ padding: 10px; >+ } >+ >+ .relative { >+ position: relative; >+ padding: 10px; >+ border: 2px solid orange; >+ } >+ >+ .spacer { >+ height: 300px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="container"> >+ <div class="scroller"> >+ <div class="clipping"> >+ <div class="relative"> >+ Text >+ </div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e03bc863f3de0f23d03611955e94239061a5bba9 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt >@@ -0,0 +1,48 @@ >+Clipping >+Relative >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 320.00 320.00) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 304.00 304.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 285.00 300.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 285.00 426.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c61370abbeaeba5140e7fc586ce6c884f5f2bb86 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html >@@ -0,0 +1,64 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .container { >+ width: 300px; >+ height: 300px; >+ border: 2px solid gray; >+ margin: 20px; >+ padding: 10px; >+ position: relative; >+ overflow-y: hidden; >+ } >+ >+ .scroller { >+ overflow-x: auto; >+ width: 100%; >+ height: 100%; >+ border: 2px solid black; >+ } >+ >+ .clipping { >+ overflow: hidden; >+ width: 200px; >+ border: 2px solid black; >+ margin: 10px; >+ padding: 20px; >+ } >+ >+ .relative { >+ position: relative; >+ border: 2px solid orange; >+ height: 40px; >+ } >+ >+ .spacer { >+ height: 300px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="container"> >+ <div class="scroller"> >+ <div class="clipping"> >+ Clipping >+ <div class="relative"> >+ Relative >+ </div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..06002b0bf4331830f7ee9718d2d2df6fe4952eb4 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt >@@ -0,0 +1,34 @@ >+relative >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 305.00 305.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 414.00 374.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll.html b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll.html >new file mode 100644 >index 0000000000000000000000000000000000000000..27a2c013c68f4e0091a89a0f6f7dea7bc2f1eec7 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll.html >@@ -0,0 +1,47 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .scroller { >+ margin: 20px; >+ width: 300px; >+ height: 300px; >+ overflow: auto; >+ border: 2px solid black; >+ padding: 10px; >+ } >+ >+ .relative { >+ position: relative; >+ top: 50px; >+ left: 200px; >+ height: 200px; >+ width: 200px; >+ border: 2px solid orange; >+ } >+ >+ .spacer { >+ height: 150px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="scroller"> >+ <div> <!-- here to test that extra container don't break sharing --> >+ <div class="relative inside">relative</div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..bcf60e2e5d246dd7bf77e342a134d194b7ad6744 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt >@@ -0,0 +1,34 @@ >+Relative foreground >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 8.00 8.00) >+ (bounds 304.00 304.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 285.00 285.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 285.00 364.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content.html b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content.html >new file mode 100644 >index 0000000000000000000000000000000000000000..91594d336f362b4c6a02bfe291198163f0264012 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests that "has painted content" is triggered by sharing</title> >+ <style> >+ .scroller { >+ overflow: scroll; >+ width: 300px; >+ height: 300px; >+ border: 2px solid black; >+ } >+ >+ .relative { >+ position: relative; >+ margin: 20px; >+ padding: 10px; >+ height: 100px; >+ border: 2px solid orange; >+ background-color: silver; >+ } >+ >+ .spacer { >+ height: 200px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="scroller"> >+ <div class="relative"> >+ Relative foreground >+ </div> >+ <div class="spacer"></div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..a136c06c5ee9b5f6360ca8e9d0eb689c26e2e067 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .scroller { >+ overflow: scroll; >+ width: 300px; >+ height: 300px; >+ border: 2px solid black; >+ } >+ >+ .relative { >+ position: relative; >+ margin: 0px 20px 0 10px; >+ padding: 10px; >+ height: 100px; >+ border: 4px solid green; >+ background-color: silver; >+ } >+ >+ .spacer { >+ height: 400px; >+ } >+ >+ .scrollbar-hider { >+ position: absolute; >+ width: 16px; >+ height: 300px; >+ top: 10px; >+ left: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+</head> >+<body> >+ <div id="scroller" class="scroller"> >+ <div class="relative"> >+ Relative foreground >+ </div> >+ <div class="spacer"></div> >+ </div> >+ </div> >+ <div class="scrollbar-hider"></div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip.html b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6ff79aec49320645957e7c8148e4634f778d46e5 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/scrolled-contents-unconstrained-clip.html >@@ -0,0 +1,57 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .scroller { >+ overflow: scroll; >+ width: 300px; >+ height: 300px; >+ border: 2px solid black; >+ } >+ >+ .relative { >+ position: relative; >+ margin: 200px 20px 0 10px; >+ padding: 10px; >+ height: 100px; >+ border: 4px solid green; >+ background-color: silver; >+ } >+ >+ .spacer { >+ height: 400px; >+ } >+ >+ .scrollbar-hider { >+ position: absolute; >+ width: 16px; >+ height: 300px; >+ top: 10px; >+ left: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ >+ window.addEventListener('load', () => { >+ setTimeout(() => { >+ document.getElementById('scroller').scrollTop = 200; >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }, 0); >+ }, false); >+ </script> >+</head> >+<body> >+ <div id="scroller" class="scroller"> >+ <div class="relative"> >+ Relative foreground >+ </div> >+ <div class="spacer"></div> >+ </div> >+ </div> >+ <div class="scrollbar-hider"></div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-clipping-expected.html b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-clipping-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f62f674df24ce38281fc263a559c607c438e482a >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-clipping-expected.html >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .container { >+ position: relative; >+ width: 200px; >+ height: 200px; >+ margin: 30px; >+ border: 3px solid black; >+ overflow: hidden; >+ } >+ >+ .compositing-trigger { >+ position: absolute; >+ left: 20px; >+ top: 10px; >+ transform: translateZ(0); >+ padding: 20px; >+ background-color: gray; >+ } >+ >+ .box { >+ margin-top: 150px; >+ margin-left: 150px; >+ width: 100px; >+ height: 100px; >+ background-color: blue; >+ } >+ </style> >+</head> >+<body> >+ <div class="compositing-trigger"></div> >+ <div class="container"> >+ <div class="box"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-clipping.html b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-clipping.html >new file mode 100644 >index 0000000000000000000000000000000000000000..80e082030f72d82f0d5b5728e1d759fb8fa53052 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-clipping.html >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .container { >+ position: relative; >+ width: 200px; >+ height: 200px; >+ margin: 30px; >+ border: 3px solid black; >+ overflow: hidden; >+ } >+ >+ .compositing-trigger { >+ position: absolute; >+ left: 20px; >+ top: 10px; >+ transform: translateZ(0); >+ padding: 20px; >+ background-color: gray; >+ } >+ >+ .relative { >+ position: relative; >+ top: 150px; >+ left: 150px; >+ width: 100px; >+ height: 100px; >+ background-color: blue; >+ } >+ </style> >+</head> >+<body> >+ <div class="compositing-trigger"></div> >+ <div class="container"> >+ <div class="relative"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b128598ea5f50c5be2fb3ec31ffc67a7f8ade8a2 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds-expected.txt >@@ -0,0 +1,23 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 2 >+ (GraphicsLayer >+ (position 20.00 10.00) >+ (bounds 50.00 50.00) >+ (contentsOpaque 1) >+ ) >+ (GraphicsLayer >+ (position 38.00 30.00) >+ (bounds 261.00 261.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds.html b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f2baf07f542511b81927c0aafc7ccf2aca821c8d >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-composited-bounds.html >@@ -0,0 +1,53 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .container { >+ position: relative; >+ width: 200px; >+ height: 200px; >+ margin: 30px; >+ border: 1px solid black; >+ } >+ >+ .box { >+ width: 100px; >+ height: 100px; >+ background-color: blue; >+ margin: 10px; >+ } >+ >+ .trigger { >+ position: absolute; >+ left: 20px; >+ top: 10px; >+ width: 50px; >+ height: 50px; >+ transform: translateZ(0); >+ background-color: gray; >+ } >+ >+ .relative { >+ position: relative; >+ top: 150px; >+ left: 150px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="trigger"></div> >+ <div class="container"> >+ <div class="relative box"></div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..cc72916594acd7aed46680044b1380befc09576e >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt >@@ -0,0 +1,33 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 4 >+ (GraphicsLayer >+ (position 20.00 10.00) >+ (bounds 50.00 50.00) >+ (contentsOpaque 1) >+ ) >+ (GraphicsLayer >+ (position 38.00 30.00) >+ (bounds 202.00 202.00) >+ (drawsContent 1) >+ ) >+ (GraphicsLayer >+ (position 160.00 160.00) >+ (bounds 100.00 100.00) >+ (contentsOpaque 1) >+ ) >+ (GraphicsLayer >+ (position 199.00 191.00) >+ (bounds 100.00 100.00) >+ (contentsOpaque 1) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking.html b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking.html >new file mode 100644 >index 0000000000000000000000000000000000000000..57ea92447c68919095f59e718d0a0cfd3b78caa3 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-nested-relative-stacking.html >@@ -0,0 +1,62 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .container { >+ position: relative; >+ width: 200px; >+ height: 200px; >+ margin: 30px; >+ border: 1px solid black; >+ } >+ >+ .box { >+ width: 100px; >+ height: 100px; >+ background-color: blue; >+ margin: 10px; >+ } >+ >+ .trigger { >+ position: absolute; >+ left: 20px; >+ top: 10px; >+ width: 50px; >+ height: 50px; >+ transform: translateZ(0); >+ background-color: gray; >+ } >+ >+ .relative { >+ position: relative; >+ top: 150px; >+ left: 150px; >+ z-index: 2; >+ } >+ >+ .interposer { >+ position: absolute; >+ left: 150px; >+ top: 150px; >+ background-color: orange; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+ window.addEventListener('load', () => { >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="trigger"></div> >+ <div class="container"> >+ <div class="relative box"></div> >+ </div> >+ <div class="interposer box"></div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-repaint-expected.txt b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-repaint-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..6013ec97957bddda40461fd4c7bd601380cca31e >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-repaint-expected.txt >@@ -0,0 +1,29 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 2 >+ (GraphicsLayer >+ (position 20.00 10.00) >+ (bounds 50.00 50.00) >+ (contentsOpaque 1) >+ ) >+ (GraphicsLayer >+ (offsetFromRenderer width=-20 height=-20) >+ (position 38.00 30.00) >+ (bounds 242.00 242.00) >+ (drawsContent 1) >+ (repaint rects >+ (rect 151.00 81.00 71.00 110.00) >+ (rect 151.00 81.00 71.00 110.00) >+ (rect 151.00 81.00 71.00 110.00) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-repaint.html b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-repaint.html >new file mode 100644 >index 0000000000000000000000000000000000000000..547137ab8ec6bd2ad0be7ceabb2a8b99adb9f480 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/overflow-scroll/shared-layer-repaint.html >@@ -0,0 +1,75 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Test repainting with layer sharing</title> >+ <style> >+ .container { >+ position: relative; >+ width: 200px; >+ height: 200px; >+ margin: 50px; >+ border: 1px solid black; >+ overflow: hidden; >+ box-shadow: 0 0 14px gray; >+ } >+ >+ .box { >+ width: 100px; >+ height: 100px; >+ background-color: blue; >+ margin: 10px; >+ } >+ >+ .box.changed { >+ background-color: orange; >+ } >+ >+ .trigger { >+ position: absolute; >+ left: 20px; >+ top: 10px; >+ width: 50px; >+ height: 50px; >+ background-color: gray; >+ transform: translateZ(0); >+ } >+ >+ .relative { >+ position: relative; >+ top: 50px; >+ left: 120px; >+ border: 5px solid green; >+ } >+ </style> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ window.addEventListener('load', () => { >+ setTimeout(() => { >+ document.body.offsetTop; >+ if (window.internals) >+ window.internals.startTrackingRepaints(); >+ >+ document.getElementById('target').classList.add('changed'); >+ >+ if (window.internals) >+ document.getElementById('layers').textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }, 0); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="trigger"></div> >+ <div class="container"> >+ <div id="target" class="relative box"> >+ </div> >+ </div> >+<pre id="layers"></pre> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/remove-sharing-layer-expected.txt b/LayoutTests/compositing/shared-layers/remove-sharing-layer-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..f9ea72aefcae35a8a8f443aeb482ac63015709fa >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/remove-sharing-layer-expected.txt >@@ -0,0 +1,3 @@ >+This test should not crash or assert. >+ >+ >diff --git a/LayoutTests/compositing/shared-layers/remove-sharing-layer.html b/LayoutTests/compositing/shared-layers/remove-sharing-layer.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dc1e23b660226cf2129b1bf900637a58312b4355 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/remove-sharing-layer.html >@@ -0,0 +1,62 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>Tests that there is no crash when a sharing layer is removed.</title> >+ <style> >+ .trigger { >+ position: absolute; >+ top: 0; >+ left: 0; >+ height: 100px; >+ width: 100px; >+ background-color: silver; >+ transform: translateZ(0); >+ } >+ >+ .absolute { >+ position: absolute; >+ top: 50px; >+ left: 50px; >+ width: 200px; >+ height: 200px; >+ background: gray; >+ } >+ >+ .inner { >+ filter: drop-shadow(black 0 0 5px); >+ margin: 10px; >+ width: 100px; >+ height: 100px; >+ background-color: blue; >+ } >+ >+ .inner.changed { >+ filter: none; >+ } >+ >+ </style> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ function doTest() >+ { >+ setTimeout(() => { >+ document.getElementById('target').classList.add('changed'); >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }, 0); >+ } >+ window.addEventListener('load', doTest, false); >+ </script> >+</head> >+<body> >+ <p>This test should not crash or assert.</p> >+ <div class="trigger"></div> >+ <div class="absolute"> >+ <div id="target" class="inner"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-layers/sharing-cached-clip-rects-expected.txt b/LayoutTests/compositing/shared-layers/sharing-cached-clip-rects-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..963d86edfeb4bb20fbfbc7ef61c38b88b0fdb82b >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/sharing-cached-clip-rects-expected.txt >@@ -0,0 +1,4 @@ >+This test should not assert in debug builds. >+ >+relative >+ >diff --git a/LayoutTests/compositing/shared-layers/sharing-cached-clip-rects.html b/LayoutTests/compositing/shared-layers/sharing-cached-clip-rects.html >new file mode 100644 >index 0000000000000000000000000000000000000000..57493b4f243cf15ccf3d74e7aeacc9fab3f277f5 >--- /dev/null >+++ b/LayoutTests/compositing/shared-layers/sharing-cached-clip-rects.html >@@ -0,0 +1,55 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .scrollable { >+ overflow: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .nested { >+ margin: 10px; >+ padding: 10px; >+ border: 1px solid gray; >+ } >+ >+ .nested > .nested > .layer { >+ margin-left: 100px; >+ background-color: silver; >+ opacity: 0.5; >+ } >+ >+ .relative { >+ position: relative; >+ margin-top: 300px; >+ border: 2px solid orange; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.dumpAsText(); >+ </script> >+</head> >+<body> >+ <p>This test should not assert in debug builds.</p> >+ <div class="scrollable"> >+ <div class="nested one"> >+ </div> >+ <div class="nested two"> >+ <div class="nested three"> >+ <div class="layer two"> >+ <div class="relative third">relative</div> >+ </div> >+ </div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/platform/ios-wk2/TestExpectations b/LayoutTests/platform/ios-wk2/TestExpectations >index 3532523ae7c28c7ee107a98cbb1266560111a0d8..2afb92d11b5d5a1d00a33ff28a4bec602b115f49 100644 >--- a/LayoutTests/platform/ios-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-wk2/TestExpectations >@@ -7,6 +7,7 @@ > #////////////////////////////////////////////////////////////////////////////////////////// > > compositing/ios [ Pass ] >+compositing/shared-layers/overflow-scroll [ Pass ] > fast/device-orientation [ Pass ] > fast/history/ios [ Pass ] > fast/scrolling/ios [ Pass ] >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..11d58254f32380eeeca2d1b3a0e98cd5e7485726 >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt >@@ -0,0 +1,47 @@ >+relativeabsolute >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 2 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 304.00 304.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 300.00 300.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 300.00 684.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (offsetFromRenderer width=-42 height=-152) >+ (position 30.00 22.00) >+ (bounds 300.00 300.00) >+ (children 1 >+ (GraphicsLayer >+ (position 42.00 152.00) >+ (bounds 150.00 150.00) >+ (contentsOpaque 1) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..57153e8e940685199b61bde635955adb8639ecda >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt >@@ -0,0 +1,45 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 2 >+ (GraphicsLayer >+ (position 8.00 8.00) >+ (bounds 404.00 404.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 400.00 400.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 400.00 1044.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (offsetFromRenderer width=-34 height=-134) >+ (position 10.00 10.00) >+ (bounds 400.00 400.00) >+ (children 1 >+ (GraphicsLayer >+ (position 34.00 134.00) >+ (bounds 220.00 220.00) >+ (contentsOpaque 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7647e2e13a5f7b79a36e80b2503bcf6a42efa509 >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt >@@ -0,0 +1,47 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 304.00 304.00) >+ (opacity 0.80) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 300.00 300.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 300.00 500.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (position 20.00 78.00) >+ (bounds 140.00 140.00) >+ (contentsOpaque 1) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (bounds 140.00 140.00) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7071bf55a7aa1c804cd192bbbb5b849e152d913f >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt >@@ -0,0 +1,62 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 3 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 320.00 320.00) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 300.00 300.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 296.00 296.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 296.00 364.00) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (position 110.00 110.00) >+ (bounds 100.00 100.00) >+ (contentsOpaque 1) >+ ) >+ (GraphicsLayer >+ (offsetFromRenderer width=-20 height=-20) >+ (position 42.00 34.00) >+ (bounds 296.00 296.00) >+ (children 1 >+ (GraphicsLayer >+ (position 20.00 20.00) >+ (bounds 256.00 24.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ad4ed627d24055f031b5fafa85768ec4adaf4332 >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt >@@ -0,0 +1,47 @@ >+Text >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 320.00 320.00) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 300.00 300.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 296.00 296.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 296.00 468.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..ca6efa1b9da51a7b68b87c6f156f7909dac733df >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt >@@ -0,0 +1,48 @@ >+Clipping >+Relative >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 320.00 320.00) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 304.00 304.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 300.00 300.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 300.00 428.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..02e00b88485856955f6cdfcce2f80856146504e7 >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt >@@ -0,0 +1,34 @@ >+relative >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 28.00 20.00) >+ (bounds 324.00 324.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 320.00 320.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 414.00 374.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..284ed046227dbe89ec35f7f55a2753f2db98ac7e >--- /dev/null >+++ b/LayoutTests/platform/ios-wk2/compositing/shared-layers/overflow-scroll/scrolled-contents-has-painted-content-expected.txt >@@ -0,0 +1,34 @@ >+Relative foreground >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (position 8.00 8.00) >+ (bounds 304.00 304.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (position 2.00 2.00) >+ (bounds 300.00 300.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=2 height=2) >+ (anchor 0.00 0.00) >+ (bounds 300.00 364.00) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt >index f91ad09900d082e0fc7021cedb9309ed6009ec63..ba7ad1a151df56ba1f948c1d7ea04055ebf26f15 100644 >--- a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt >+++ b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt >@@ -1,4 +1,5 @@ >-absabs >+abs >+abs > > (Frame scrolling node > (scrollable area size 800 600) >@@ -13,10 +14,10 @@ absabs > (min layout viewport origin (0,0)) > (max layout viewport origin (0,0)) > (behavior for fixed 0) >- (children 3 >+ (children 5 > (Overflow scrolling node > (scrollable area size 300 300) >- (contents size 381 500) >+ (contents size 381 530) > (parent relative scrollable rect at (30,35) size 300x300) > (scrollable area parameters > (horizontal scroll elasticity 1) >@@ -26,12 +27,24 @@ absabs > (has enabled horizontal scrollbar 1) > (has enabled vertical scrollbar 1)) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,10)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Positioned node > (layout constraints > (layer-position-at-last-layout (50,50)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (62,82)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Positioned node > (layout constraints > (layer-position-at-last-layout (77,77)) >diff --git a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt >index 9270eee44bf777e2f09fae8028895f9a130c553c..af9309b1bb2153411ed8df1c0fef736f19c27cb5 100644 >--- a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt >+++ b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt >@@ -1,4 +1,5 @@ >-absabs >+abs >+abs > > (Frame scrolling node > (scrollable area size 800 600) >@@ -13,10 +14,10 @@ absabs > (min layout viewport origin (0,0)) > (max layout viewport origin (0,0)) > (behavior for fixed 0) >- (children 4 >+ (children 7 > (Overflow scrolling node > (scrollable area size 300 300) >- (contents size 300 526) >+ (contents size 300 556) > (parent relative scrollable rect at (30,22) size 300x300) > (scrollable area parameters > (horizontal scroll elasticity 1) >@@ -27,19 +28,37 @@ absabs > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (0,0)) >+ (layer-position-at-last-layout (10,10)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (53,53)) >+ (layer-position-at-last-layout (0,30)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (80,80)) >+ (layer-position-at-last-layout (13,43)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (53,83)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (65,115)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (80,110)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >diff --git a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt >index dced88a9e12f75f7475075526b1f590caf1247e3..45cb0eb0664ec4c56dc420219e6c330f0e0e104d 100644 >--- a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt >+++ b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt >@@ -1,4 +1,5 @@ >-absabs >+abs >+abs > > (Frame scrolling node > (scrollable area size 800 600) >@@ -16,7 +17,7 @@ absabs > (children 1 > (Overflow scrolling node > (scrollable area size 300 300) >- (contents size 300 500) >+ (contents size 300 530) > (parent relative scrollable rect at (30,22) size 300x300) > (scrollable area parameters > (horizontal scroll elasticity 1) >diff --git a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt >index 216a6ae8ab136cdf467c079a86de973bc5671801..161f39895b4fee7320a16f00c1f8b8803ba354be 100644 >--- a/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt >+++ b/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt >@@ -26,7 +26,7 @@ Stacking > (min layout viewport origin (0,0)) > (max layout viewport origin (0,229)) > (behavior for fixed 0) >- (children 12 >+ (children 19 > (Overflow scrolling node > (scrollable area size 220 170) > (contents size 220 1020) >@@ -40,13 +40,19 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,30)) >+ (layer-position-at-last-layout (20,40)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,50)) >+ (layer-position-at-last-layout (10,60)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,80)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >@@ -63,7 +69,13 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,30)) >+ (layer-position-at-last-layout (20,40)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,60)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >@@ -78,6 +90,12 @@ Stacking > (vertical scrollbar mode 0) > (has enabled vertical scrollbar 1)) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (20,40)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Overflow scrolling node > (scrollable area size 220 170) > (contents size 220 1020) >@@ -89,6 +107,12 @@ Stacking > (vertical scrollbar mode 0) > (has enabled vertical scrollbar 1)) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (20,40)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Overflow scrolling node > (scrollable area size 220 170) > (contents size 220 1020) >@@ -102,13 +126,25 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,30)) >+ (layer-position-at-last-layout (20,40)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (110,50)) >+ (layer-position-at-last-layout (10,60)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (20,90)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (110,110)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >@@ -125,13 +161,19 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,30)) >+ (layer-position-at-last-layout (20,40)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,60)) > (positioning-behavior moves)) > (related overflow nodes 1) > (children 1 > (Positioned node > (layout constraints >- (layer-position-at-last-layout (79,20)) >+ (layer-position-at-last-layout (79,50)) > (positioning-behavior stationary)) > (related overflow nodes 1) > ) >diff --git a/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt b/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt >index 8c4d7a802db47d89b2a89e68dab844cb58eb5d1f..b30dbb91ecce5556aca22d83386ae50468f9ea5a 100644 >--- a/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt >+++ b/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt >@@ -11,7 +11,7 @@ middlebottom > (GraphicsLayer > (bounds 800.00 2618.00) > (contentsOpaque 1) >- (children 6 >+ (children 3 > (GraphicsLayer > (position 21.00 21.00) > (bounds 100.00 100.00) >@@ -21,32 +21,6 @@ middlebottom > (bounds 220.00 220.00) > (drawsContent 1) > ) >- (GraphicsLayer >- (offsetFromRenderer width=0 height=100) >- (position 28.00 20.00) >- (bounds 200.00 200.00) >- (children 1 >- (GraphicsLayer >- (offsetFromRenderer width=0 height=100) >- (bounds 110.00 200.00) >- (contentsOpaque 1) >- (drawsContent 1) >- ) >- ) >- ) >- (GraphicsLayer >- (offsetFromRenderer width=-5 height=-145) >- (position 28.00 20.00) >- (bounds 200.00 200.00) >- (children 1 >- (GraphicsLayer >- (offsetFromRenderer width=0 height=-1) >- (position 5.00 144.00) >- (bounds 144.00 25.00) >- (drawsContent 1) >- ) >- ) >- ) > (GraphicsLayer > (offsetFromRenderer width=0 height=100) > (position 28.00 250.00) >@@ -54,21 +28,7 @@ middlebottom > (children 1 > (GraphicsLayer > (offsetFromRenderer width=0 height=100) >- (bounds 110.00 200.00) >- (contentsOpaque 1) >- (drawsContent 1) >- ) >- ) >- ) >- (GraphicsLayer >- (offsetFromRenderer width=-5 height=-145) >- (position 28.00 250.00) >- (bounds 185.00 200.00) >- (children 1 >- (GraphicsLayer >- (offsetFromRenderer width=0 height=-1) >- (position 5.00 144.00) >- (bounds 144.00 25.00) >+ (bounds 149.00 200.00) > (drawsContent 1) > ) > ) >diff --git a/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt b/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt >index 3b15c258d67055d6a17c2f085c731227c0320da7..80cde01a2d8c1ae809e6c680ff81504932d215b5 100644 >--- a/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt >+++ b/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt >@@ -19,7 +19,7 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (coverage rect 0.00, 0.00 800.00 x 600.00) > (intersects coverage rect 1) > (contentsScale 2.00) >- (children 6 >+ (children 4 > (GraphicsLayer > (position 8.00 102.00) > (bounds 22.00 22.00) >@@ -48,39 +48,12 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (contentsScale 2.00) > ) > (GraphicsLayer >- (position 9.00 91.00) >- (bounds 100.00 20.00) >- (visible rect 0.00, 0.00 100.00 x 20.00) >- (coverage rect 0.00, 0.00 100.00 x 20.00) >- (intersects coverage rect 1) >- (contentsScale 2.00) >- (children 1 >- (GraphicsLayer >- (bounds 100.00 20.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 100.00 x 20.00) >- (coverage rect 0.00, 0.00 100.00 x 20.00) >- (intersects coverage rect 1) >- (contentsScale 2.00) >- ) >- ) >- ) >- (GraphicsLayer >- (position 8.00 134.00) >- (bounds 102.00 22.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 102.00 x 22.00) >- (coverage rect -8.00, -134.00 800.00 x 600.00) >- (intersects coverage rect 1) >- (contentsScale 2.00) >- ) >- (GraphicsLayer >- (offsetFromRenderer width=-9 height=0) >- (position 0.00 135.00) >- (bounds 807.00 20.00) >+ (offsetFromRenderer width=-17 height=0) >+ (position -9.00 134.00) >+ (bounds 816.00 22.00) > (drawsContent 1) >- (visible rect 0.00, 0.00 800.00 x 20.00) >- (coverage rect 0.00, -135.00 800.00 x 600.00) >+ (visible rect 9.00, 0.00 800.00 x 22.00) >+ (coverage rect 9.00, -134.00 800.00 x 600.00) > (intersects coverage rect 1) > (contentsScale 2.00) > ) >diff --git a/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt b/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt >index 199a547ccc811f80c1ff7db48e5478da1f06ec5e..176bef00d24356622a3e2580f11b689d6f807660 100644 >--- a/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt >+++ b/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt >@@ -19,7 +19,7 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (coverage rect 0.00, 0.00 800.00 x 600.00) > (intersects coverage rect 1) > (contentsScale 2.00) >- (children 6 >+ (children 4 > (GraphicsLayer > (position 8.00 102.00) > (bounds 22.00 22.00) >@@ -47,42 +47,15 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (intersects coverage rect 1) > (contentsScale 2.00) > ) >- (GraphicsLayer >- (position 9.00 91.00) >- (bounds 100.00 20.00) >- (visible rect 0.00, 0.00 100.00 x 20.00) >- (coverage rect 0.00, 0.00 100.00 x 20.00) >- (intersects coverage rect 1) >- (contentsScale 2.00) >- (children 1 >- (GraphicsLayer >- (bounds 100.00 20.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 100.00 x 20.00) >- (coverage rect 0.00, 0.00 100.00 x 20.00) >- (intersects coverage rect 1) >- (contentsScale 2.00) >- ) >- ) >- ) > (GraphicsLayer > (position 8.00 134.00) >- (bounds 102.00 22.00) >+ (bounds 799.00 22.00) > (drawsContent 1) >- (visible rect 0.00, 0.00 102.00 x 22.00) >+ (visible rect 0.00, 0.00 792.00 x 22.00) > (coverage rect -8.00, -134.00 800.00 x 600.00) > (intersects coverage rect 1) > (contentsScale 2.00) > ) >- (GraphicsLayer >- (position 9.00 135.00) >- (bounds 798.00 20.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 791.00 x 20.00) >- (coverage rect -9.00, -135.00 800.00 x 600.00) >- (intersects coverage rect 1) >- (contentsScale 2.00) >- ) > ) > ) > ) >diff --git a/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt b/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt >index bb668416d6f3bb4b997ac7c0f1e5b09c2c5dea89..581adf07d2f3e185425011c5d1ccde7de7ff59c9 100644 >--- a/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt >+++ b/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt >@@ -15,7 +15,14 @@ > (GraphicsLayer > (anchor 0.00 0.00) > (bounds 320.00 1224.00) >- (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 284.00 1204.00) >+ (contentsOpaque 1) >+ (drawsContent 1) >+ ) >+ ) > ) > ) > ) >diff --git a/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt b/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt >index 8b137891791fe96927ad78e64b0aad7bded08bdc..6bc82b34ae6a29b79f620b7da867354415632019 100644 >--- a/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt >+++ b/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt >@@ -1 +1,25 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 600.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 600.00) >+ (contentsOpaque 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=-10 height=-10) >+ (bounds 305.00 325.00) >+ (children 1 >+ (GraphicsLayer >+ (position 10.00 10.00) >+ (bounds 284.00 1204.00) >+ (contentsOpaque 1) >+ (drawsContent 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) > >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index f4c190dafc79e5322a0b1dcea2f83e72e602bce1..0b5c41460d0ec772ba84b325c8bfb9e4591808dc 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -5,6 +5,7 @@ > # Platform-specific directories. Skipped globally, then re-enabled here. > #////////////////////////////////////////////////////////////////////////////////////////// > >+compositing/shared-layers/overflow-scroll [ Pass ] > editing/find [ Pass ] > editing/undo-manager [ Pass ] > fast/forms/select/mac-wk2 [ Pass ] >diff --git a/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt b/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt >index cb258fde79a217a776cccf89f83d6ebafa9c182f..70080d144aa7fcd8ac71715c8c5e3b5bf554a6f7 100644 >--- a/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt >+++ b/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt >@@ -19,7 +19,7 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (coverage rect 0.00, 0.00 800.00 x 585.00) > (intersects coverage rect 1) > (contentsScale 1.00) >- (children 6 >+ (children 4 > (GraphicsLayer > (position 8.00 96.00) > (bounds 22.00 22.00) >@@ -48,39 +48,12 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (contentsScale 1.00) > ) > (GraphicsLayer >- (position 9.00 87.00) >- (bounds 100.00 18.00) >- (visible rect 0.00, 0.00 100.00 x 18.00) >- (coverage rect 0.00, 0.00 100.00 x 18.00) >- (intersects coverage rect 1) >- (contentsScale 1.00) >- (children 1 >- (GraphicsLayer >- (bounds 100.00 18.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 100.00 x 18.00) >- (coverage rect 0.00, 0.00 100.00 x 18.00) >- (intersects coverage rect 1) >- (contentsScale 1.00) >- ) >- ) >- ) >- (GraphicsLayer >- (position 8.00 128.00) >- (bounds 102.00 20.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 102.00 x 20.00) >- (coverage rect -8.00, -128.00 800.00 x 585.00) >- (intersects coverage rect 1) >- (contentsScale 1.00) >- ) >- (GraphicsLayer >- (offsetFromRenderer width=-9 height=0) >- (position 0.00 129.00) >- (bounds 807.00 18.00) >+ (offsetFromRenderer width=-16 height=0) >+ (position -8.00 128.00) >+ (bounds 815.00 20.00) > (drawsContent 1) >- (visible rect 0.00, 0.00 800.00 x 18.00) >- (coverage rect 0.00, -129.00 800.00 x 585.00) >+ (visible rect 8.00, 0.00 800.00 x 20.00) >+ (coverage rect 8.00, -128.00 800.00 x 585.00) > (intersects coverage rect 1) > (contentsScale 1.00) > ) >diff --git a/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt b/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt >index ac2b42c2f1a3a29e9dedbf8072f4914b79406f02..8f7ac9c4758b2093e62fd306c8f9867ce16b368c 100644 >--- a/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt >+++ b/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt >@@ -19,7 +19,7 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (coverage rect 0.00, 0.00 800.00 x 585.00) > (intersects coverage rect 1) > (contentsScale 1.00) >- (children 6 >+ (children 4 > (GraphicsLayer > (position 8.00 96.00) > (bounds 22.00 22.00) >@@ -47,42 +47,15 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor > (intersects coverage rect 1) > (contentsScale 1.00) > ) >- (GraphicsLayer >- (position 9.00 87.00) >- (bounds 100.00 18.00) >- (visible rect 0.00, 0.00 100.00 x 18.00) >- (coverage rect 0.00, 0.00 100.00 x 18.00) >- (intersects coverage rect 1) >- (contentsScale 1.00) >- (children 1 >- (GraphicsLayer >- (bounds 100.00 18.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 100.00 x 18.00) >- (coverage rect 0.00, 0.00 100.00 x 18.00) >- (intersects coverage rect 1) >- (contentsScale 1.00) >- ) >- ) >- ) > (GraphicsLayer > (position 8.00 128.00) >- (bounds 102.00 20.00) >+ (bounds 799.00 20.00) > (drawsContent 1) >- (visible rect 0.00, 0.00 102.00 x 20.00) >+ (visible rect 0.00, 0.00 792.00 x 20.00) > (coverage rect -8.00, -128.00 800.00 x 585.00) > (intersects coverage rect 1) > (contentsScale 1.00) > ) >- (GraphicsLayer >- (position 9.00 129.00) >- (bounds 798.00 18.00) >- (drawsContent 1) >- (visible rect 0.00, 0.00 791.00 x 18.00) >- (coverage rect -9.00, -129.00 800.00 x 585.00) >- (intersects coverage rect 1) >- (contentsScale 1.00) >- ) > ) > ) > ) >diff --git a/LayoutTests/scrollingcoordinator/mac/programmatic-frame-scroll-expected.html b/LayoutTests/scrollingcoordinator/mac/programmatic-frame-scroll-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..d849972946002c831071319226abed7b5aa45b58 >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/mac/programmatic-frame-scroll-expected.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncFrameScrollingEnabled=true ] --> >+<html> >+<head> >+ <meta name="viewport" content="width=device-width"> >+ <style> >+ body { >+ margin: 0; >+ } >+ iframe { >+ position: relative; >+ margin: 10px; >+ border: none; >+ width: 300px; >+ height: 300px; >+ } >+ .scrollbar-hider { >+ position: absolute; >+ width: 16px; >+ height: 300px; >+ top: 10px; >+ left: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+</head> >+<body> >+ <iframe id="test-frame" srcdoc=" >+ <style> >+ body { >+ height: 2000px; >+ margin: 0; >+ } >+ .box { >+ width: 300px; >+ height: 300px; >+ background-color: green; >+ } >+ </style> >+ <body> >+ <div class='box'></div> >+ </body> >+ "></iframe> >+ <div class="scrollbar-hider"></div> >+</body> >+</html> >diff --git a/LayoutTests/scrollingcoordinator/mac/programmatic-frame-scroll.html b/LayoutTests/scrollingcoordinator/mac/programmatic-frame-scroll.html >new file mode 100644 >index 0000000000000000000000000000000000000000..a22b6c90da956d36415eb73bd2293381b4dab9b8 >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/mac/programmatic-frame-scroll.html >@@ -0,0 +1,54 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncFrameScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ body { >+ margin: 0; >+ } >+ iframe { >+ position: relative; >+ margin: 10px; >+ border: none; >+ width: 300px; >+ height: 300px; >+ } >+ .scrollbar-hider { >+ position: absolute; >+ width: 16px; >+ height: 300px; >+ top: 10px; >+ left: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+ <script> >+ function doTest() >+ { >+ let iframe = document.getElementById('test-frame'); >+ iframe.contentDocument.scrollingElement.scrollTop = 300; >+ } >+ >+ window.addEventListener('load', doTest, false); >+ </script> >+</head> >+<body> >+ <iframe id="test-frame" srcdoc=" >+ <style> >+ body { >+ height: 2000px; >+ margin: 0; >+ } >+ .box { >+ margin-top: 300px; >+ width: 300px; >+ height: 300px; >+ background-color: green; >+ } >+ </style> >+ <body> >+ <div class='box'></div> >+ </body> >+ "></iframe> >+ <div class="scrollbar-hider"></div> >+</body> >+</html> >diff --git a/LayoutTests/scrollingcoordinator/mac/programmatic-overflow-scroll-expected.html b/LayoutTests/scrollingcoordinator/mac/programmatic-overflow-scroll-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c25a28abbef33b378d5732f8a60f6ad97c2c58e2 >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/mac/programmatic-overflow-scroll-expected.html >@@ -0,0 +1,48 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <meta name="viewport" content="width=device-width"> >+ <style> >+ body { >+ margin: 0; >+ } >+ >+ #scroller { >+ margin: 10px; >+ height: 300px; >+ width: 300px; >+ overflow: scroll; >+ -webkit-overflow-scrolling: touch; >+ } >+ >+ .box { >+ width: 100%; >+ height: 100%; >+ } >+ >+ .top { >+ background-color: green; >+ } >+ >+ .bottom { >+ background-color: green; >+ } >+ >+ .scrollbar-hider { >+ position: absolute; >+ width: 16px; >+ height: 300px; >+ top: 10px; >+ left: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+</head> >+<body> >+ <div id="scroller"> >+ <div class="top box"></div> >+ <div class="bottom box"></div> >+ </div> >+ <div class="scrollbar-hider"></div> >+</body> >+</html> >diff --git a/LayoutTests/scrollingcoordinator/mac/programmatic-overflow-scroll.html b/LayoutTests/scrollingcoordinator/mac/programmatic-overflow-scroll.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c0d7f6549892426896c4cf241df40d8cc816040d >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/mac/programmatic-overflow-scroll.html >@@ -0,0 +1,55 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <meta name="viewport" content="width=device-width"> >+ <style> >+ body { >+ margin: 0; >+ } >+ >+ #scroller { >+ margin: 10px; >+ height: 300px; >+ width: 300px; >+ overflow: scroll; >+ } >+ >+ .box { >+ width: 100%; >+ height: 100%; >+ } >+ >+ .top { >+ background-color: red; >+ } >+ >+ .bottom { >+ background-color: green; >+ } >+ >+ .scrollbar-hider { >+ position: absolute; >+ width: 16px; >+ height: 300px; >+ top: 10px; >+ left: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+ <script> >+ function doTest() >+ { >+ scroller.scrollTop = 500; >+ } >+ >+ window.addEventListener('load', doTest, false); >+ </script> >+</head> >+<body> >+ <div id="scroller"> >+ <div class="top box"></div> >+ <div class="bottom box"></div> >+ </div> >+ <div class="scrollbar-hider"></div> >+</body> >+</html> >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt >index 59c823cb282f7931ad7474adbc3e382f32b71f41..81be07300410995a5b1045dab5dab213c99cf7a9 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt >@@ -1,4 +1,5 @@ >-absabs >+abs >+abs > > (Frame scrolling node > (scrollable area size 800 600) >@@ -13,10 +14,10 @@ absabs > (min layout viewport origin (0,0)) > (max layout viewport origin (0,0)) > (behavior for fixed 0) >- (children 3 >+ (children 5 > (Overflow scrolling node > (scrollable area size 285 285) >- (contents size 381 500) >+ (contents size 381 530) > (parent relative scrollable rect at (30,35) size 285x285) > (scrollable area parameters > (horizontal scroll elasticity 0) >@@ -26,12 +27,24 @@ absabs > (has enabled horizontal scrollbar 1) > (has enabled vertical scrollbar 1)) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,10)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Positioned node > (layout constraints > (layer-position-at-last-layout (50,50)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (62,80)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Positioned node > (layout constraints > (layer-position-at-last-layout (77,77)) >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html >index 526f732029004b1f6eecb36f3a460db26472a846..249826e68b865d60148c4d3d931e0e448d32bda3 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html >@@ -35,6 +35,13 @@ > height: 500px; > background-image: repeating-linear-gradient(white, silver 200px); > } >+ >+ .sharing-preventer { >+ transform: translateZ(0); >+ margin: 10px; >+ width: 10px; >+ height: 10px; >+ } > </style> > <script> > if (window.testRunner) >@@ -48,7 +55,9 @@ > </head> > <body> > <div class="scroller"> >+ <div class="sharing-preventer"></div> > <div class="absolute">abs >+ <div class="sharing-preventer"></div> > <div class="inner absolute">abs</div> > </div> > <div class="scrollcontent"></div> >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt >index f25a7499c632405276bf196c0a8b8902143105ca..1ac1643606053de52f3daf0826997e216fc97de4 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt >@@ -1,4 +1,5 @@ >-absabs >+abs >+abs > > (Frame scrolling node > (scrollable area size 800 600) >@@ -13,10 +14,10 @@ absabs > (min layout viewport origin (0,0)) > (max layout viewport origin (0,0)) > (behavior for fixed 0) >- (children 4 >+ (children 7 > (Overflow scrolling node > (scrollable area size 285 285) >- (contents size 285 526) >+ (contents size 285 556) > (parent relative scrollable rect at (30,22) size 285x285) > (scrollable area parameters > (horizontal scroll elasticity 0) >@@ -27,19 +28,37 @@ absabs > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (0,0)) >+ (layer-position-at-last-layout (10,10)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (53,53)) >+ (layer-position-at-last-layout (0,30)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (80,80)) >+ (layer-position-at-last-layout (13,43)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (53,83)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (65,113)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (80,110)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html >index 8deb6d093654cd0724a6b09468f1bcac5199a3f6..19f9cf03db5ac5827d5c5f9eee9d2b97cc8901d2 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html >@@ -40,6 +40,13 @@ > height: 500px; > background-image: repeating-linear-gradient(white, silver 200px); > } >+ >+ .sharing-preventer { >+ transform: translateZ(0); >+ margin: 10px; >+ width: 10px; >+ height: 10px; >+ } > </style> > <script> > if (window.testRunner) >@@ -54,8 +61,11 @@ > <body> > > <div class="scroller"> >+ <div class="sharing-preventer"></div> > <div class="relative"> >+ <div class="sharing-preventer"></div> > <div class="absolute">abs >+ <div class="sharing-preventer"></div> > <div class="inner absolute">abs</div> > </div> > </div> >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt >index 5a9cfd98bc88c932f756b7afb8c230b1e9c800e1..80aeb63a12db389e0a9d42dfdcaa454ba59ebe22 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt >@@ -1,4 +1,5 @@ >-absabs >+abs >+abs > > (Frame scrolling node > (scrollable area size 800 600) >@@ -16,7 +17,7 @@ absabs > (children 1 > (Overflow scrolling node > (scrollable area size 285 285) >- (contents size 285 500) >+ (contents size 285 530) > (parent relative scrollable rect at (30,22) size 285x285) > (scrollable area parameters > (horizontal scroll elasticity 0) >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html >index 6cc87bbb4f37f75e3881dffa11f0b8de0e75596e..df0ad8701a62a06557a2da1f4ce9776b3db4e785 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html >@@ -35,6 +35,13 @@ > height: 500px; > background-image: repeating-linear-gradient(white, silver 200px); > } >+ >+ .sharing-preventer { >+ transform: translateZ(0); >+ margin: 10px; >+ width: 10px; >+ height: 10px; >+ } > </style> > <script> > if (window.testRunner) >@@ -48,7 +55,9 @@ > </head> > <body> > <div class="scroller"> >+ <div class="sharing-preventer"></div> > <div class="absolute">abs >+ <div class="sharing-preventer"></div> > <div class="inner absolute">abs</div> > </div> > <div class="scrollcontent"></div> >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt b/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt >index b7a8681aef22de71634a30b837582938ffe85ed9..8fa8d8ba01cf2884b0b746a1bbbdae7232b84440 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt >@@ -27,7 +27,7 @@ Stacking > (min layout viewport origin (0,0)) > (max layout viewport origin (0,229)) > (behavior for fixed 0) >- (children 12 >+ (children 19 > (Overflow scrolling node > (scrollable area size 205 155) > (contents size 210 1020) >@@ -42,13 +42,19 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,28)) >+ (layer-position-at-last-layout (20,38)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,46)) >+ (layer-position-at-last-layout (10,58)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,76)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >@@ -66,7 +72,13 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,28)) >+ (layer-position-at-last-layout (20,38)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,58)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >@@ -81,6 +93,12 @@ Stacking > (vertical scrollbar mode 0) > (has enabled vertical scrollbar 1)) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (20,38)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Overflow scrolling node > (scrollable area size 205 155) > (contents size 205 1020) >@@ -92,6 +110,12 @@ Stacking > (vertical scrollbar mode 0) > (has enabled vertical scrollbar 1)) > ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (20,38)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) > (Overflow scrolling node > (scrollable area size 205 155) > (contents size 210 1020) >@@ -106,13 +130,25 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,28)) >+ (layer-position-at-last-layout (20,38)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (110,46)) >+ (layer-position-at-last-layout (10,58)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (20,86)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (110,106)) > (positioning-behavior moves)) > (related overflow nodes 1) > ) >@@ -129,13 +165,19 @@ Stacking > ) > (Positioned node > (layout constraints >- (layer-position-at-last-layout (10,28)) >+ (layer-position-at-last-layout (20,38)) >+ (positioning-behavior moves)) >+ (related overflow nodes 1) >+ ) >+ (Positioned node >+ (layout constraints >+ (layer-position-at-last-layout (10,58)) > (positioning-behavior moves)) > (related overflow nodes 1) > (children 1 > (Positioned node > (layout constraints >- (layer-position-at-last-layout (79,18)) >+ (layer-position-at-last-layout (79,48)) > (positioning-behavior stationary)) > (related overflow nodes 1) > ) >diff --git a/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html b/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html >index afca83c7262b777754d3042f7741ca0b4a006502..1d74f6eabd259845ed741592f4e1aa0373015fa5 100644 >--- a/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html >+++ b/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html >@@ -47,6 +47,7 @@ > .absolute { > position: absolute; > left: 100px; >+ transform: translateZ(0); > } > > .composited { >@@ -57,6 +58,13 @@ > .scrolling-content { > height: 1000px; > } >+ >+ .sharing-preventer { >+ transform: translateZ(0); >+ margin: 10px; >+ width: 10px; >+ height: 10px; >+ } > </style> > <script> > if (window.testRunner) >@@ -76,8 +84,10 @@ > <div class="scroller"> > <div class="scrolling-content"> > Scrolling content >+ <div class="sharing-preventer"></div> > <div class="stacking"> > Stacking >+ <div class="sharing-preventer"></div> > <div class="absolute box"></div> > </div> > </div> >@@ -88,8 +98,10 @@ > <div class="scroller"> > <div class="scrolling-content"> > Scrolling content >+ <div class="sharing-preventer"></div> > <div class="containing"> > Containing >+ <div class="sharing-preventer"></div> > <div class="absolute box"></div> > </div> > </div> >@@ -100,6 +112,7 @@ > <div class="scroller"> > <div class="scrolling-content"> > Scrolling content >+ <div class="sharing-preventer"></div> > <div class="absolute box"></div> > </div> > </div> >@@ -113,6 +126,7 @@ > <div class="scroller"> > <div class="scrolling-content"> > Scrolling content >+ <div class="sharing-preventer"></div> > <div class="absolute box"></div> > </div> > </div> >@@ -123,10 +137,12 @@ > <div class="scroller"> > <div class="scrolling-content"> > Scrolling content >+ <div class="sharing-preventer"></div> > <div class="stacking"> > Stacking > <div class="containing"> > Containing >+ <div class="sharing-preventer"></div> > <div class="absolute box"></div> > </div> > </div> >@@ -137,10 +153,12 @@ > <div class="scroller"> > <div class="scrolling-content"> > Scrolling content >+ <div class="sharing-preventer"></div> > <div class="containing"> > Containing > <div class="stacking"> > Stacking >+ <div class="sharing-preventer"></div> > <div class="absolute box"></div> > </div> > </div>
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 197561
:
369080
|
369082
|
369083
|
369085
|
369087
|
369088
|
369134
|
369231
|
369232
|
369234
|
369243
|
369245
|
369246
|
369251
|
369294
|
369301
|
369316
|
369320
|
369355
|
369357
|
369359
|
369360
|
369364