<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[245387] branches/safari-608.1.24-branch</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/245387">245387</a></dd>
<dt>Author</dt> <dd>kocsen_chung@apple.com</dd>
<dt>Date</dt> <dd>2019-05-15 23:01:45 -0700 (Wed, 15 May 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/245170">r245170</a>. rdar://problem/50445998

    Implement backing-sharing in 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 Antti Koivisto.
    Source/WebCore:

    This change introduces the concept of layers that share backing store for compositing. A layer
    which is sharing its backing store 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 backing-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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
           compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
           compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
           compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
           compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
           compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
           compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
           compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
           compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
           compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
           compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
           compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
           compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
           compositing/shared-backing/partial-compositing-update.html
           compositing/shared-backing/partial-compositing-update2.html
           compositing/shared-backing/remove-sharing-layer.html
           compositing/shared-backing/sharing-cached-clip-rects.html

    * rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::~RenderLayer):
    (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
    (WebCore::RenderLayer::setBackingProviderLayer):
    (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
    (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
    (WebCore::RenderLayer::clippingRootForPainting const):
    (WebCore::RenderLayer::clipToRect):
    (WebCore::RenderLayer::paintLayer):
    (WebCore::RenderLayer::updateClipRects):
    (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
    (WebCore::RenderLayer::calculateClipRects const):
    (WebCore::outputPaintOrderTreeLegend):
    (WebCore::outputPaintOrderTreeRecursive):
    (WebCore::inContainingBlockChain): Deleted.
    * rendering/RenderLayer.h:
    * rendering/RenderLayerBacking.cpp:
    (WebCore::RenderLayerBacking::willBeDestroyed):
    (WebCore::clearBackingSharingLayerProviders):
    (WebCore::RenderLayerBacking::setBackingSharingLayers):
    (WebCore::RenderLayerBacking::removeBackingSharingLayer):
    (WebCore::RenderLayerBacking::clearBackingSharingLayers):
    (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::stateForPaintOrderChildren const):
    (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
    (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
    (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
    (WebCore::RenderLayerCompositor::updateCompositingLayers):
    (WebCore::backingProviderLayerCanIncludeLayer):
    (WebCore::RenderLayerCompositor::computeCompositingRequirements):
    (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
    (WebCore::RenderLayerCompositor::updateBacking):
    (WebCore::RenderLayerCompositor::layerWillBeRemoved):
    (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
    * rendering/RenderLayerCompositor.h:
    * rendering/RenderTreeAsText.cpp:

    LayoutTests:

    New tests for backing sharing, and new baselines of tests whose behavior is changed.

    Scrolling tree tests that would be invalidate by sharing are changed to defeat sharing by adding
    compositing layers early in stacking order.

    * 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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
    * compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html: Added.
    * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html: Added.
    * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html.
    * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html: Added.
    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html: Added.
    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html: Added.
    * compositing/shared-backing/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-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html: Added.
    * compositing/shared-backing/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-backing/overflow-scroll/scrolled-contents-has-painted-content.html: Added.
    * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html: Added.
    * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-clipping.html: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt: Added.
    * compositing/shared-backing/overflow-scroll/shared-layer-repaint.html: Added.
    * compositing/shared-backing/partial-compositing-update-expected.txt: Added.
    * compositing/shared-backing/partial-compositing-update.html: Added.
    * compositing/shared-backing/partial-compositing-update2-expected.txt: Added.
    * compositing/shared-backing/partial-compositing-update2.html: Added.
    * compositing/shared-backing/remove-sharing-layer-expected.txt: Added.
    * compositing/shared-backing/remove-sharing-layer.html: Added.
    * compositing/shared-backing/sharing-cached-clip-rects-expected.txt: Added.
    * compositing/shared-backing/sharing-cached-clip-rects.html: Added.
    * platform/ios-wk2/TestExpectations:
    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
    * platform/ios-wk2/compositing/shared-backing/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-backing/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:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245170 268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari608124branchLayoutTestsChangeLog">branches/safari-608.1.24-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari608124branchLayoutTestsTestExpectations">branches/safari-608.1.24-branch/LayoutTests/TestExpectations</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositinggeometrylimitlayerboundsclippingancestorexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositinglayercreationoverflowscrolloverlapexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositinglayercreationoverflowscrolloverlaphtml">branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingoverflowscrollingcontentcliptoviewporthtml">branches/safari-608.1.24-branch/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingrtlrtlscrollingwithtransformeddescendantsexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioscompositinggeometrylimitlayerboundsclippingancestorexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioscompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendantsexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioscompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendants2expectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2TestExpectations">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/TestExpectations</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreenestedabsoluteinabsoluteoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreenestedabsoluteinrelativeinoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreenestedabsoluteinscoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreepositionednodescomplexexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformmaccompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendantsexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformmaccompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendants2expectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformmacwk1compositingoverflowscrollingcontentcliptoviewportexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformmacwk2TestExpectations">branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk2/TestExpectations</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinabsoluteoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinabsoluteoverflowhtml">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinrelativeinoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinrelativeinoverflowhtml">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinscoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinscoverflowhtml">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreepositionednodescomplexexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreepositionednodescomplexhtml">branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html</a></li>
<li><a href="#branchessafari608124branchSourceWebCoreChangeLog">branches/safari-608.1.24-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari608124branchSourceWebCorerenderingRenderLayercpp">branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#branchessafari608124branchSourceWebCorerenderingRenderLayerh">branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.h</a></li>
<li><a href="#branchessafari608124branchSourceWebCorerenderingRenderLayerBackingcpp">branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#branchessafari608124branchSourceWebCorerenderingRenderLayerBackingh">branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.h</a></li>
<li><a href="#branchessafari608124branchSourceWebCorerenderingRenderLayerCompositorcpp">branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#branchessafari608124branchSourceWebCorerenderingRenderLayerCompositorh">branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.h</a></li>
<li><a href="#branchessafari608124branchSourceWebCorerenderingRenderTreeAsTextcpp">branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderTreeAsText.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollabsoluteinstackingrelativeinscrollerexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollabsoluteinstackingrelativeinscrollerhtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollcompositedabsoluteinabsoluteinrelativeinscrollerexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollcompositedabsoluteinabsoluteinrelativeinscrollerhtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollnestedabsolutewithclippinginstackingoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollnestedabsolutewithclippinginstackingoverflowhtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollprevioussiblingpreventsinclusivenessexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollprevioussiblingpreventsinclusivenesshtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinclippingexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinclippinghtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinrelativeclippingexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinrelativeclippinghtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeindivinoverflowscrollexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeindivinoverflowscrollhtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentshaspaintedcontentexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentshaspaintedcontenthtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentsunconstrainedclipexpectedhtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentsunconstrainedcliphtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerclippingexpectedhtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerclippinghtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayercompositedboundsexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayercompositedboundshtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayernestedrelativestackingexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayernestedrelativestackinghtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerrepaintexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerrepainthtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdateexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdatehtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdate2expectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdate2html">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingremovesharinglayerexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingremovesharinglayerhtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingsharingcachedcliprectsexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestscompositingsharedbackingsharingcachedcliprectshtml">branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects.html</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollabsoluteinstackingrelativeinscrollerexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollcompositedabsoluteinabsoluteinrelativeinscrollerexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollnestedabsolutewithclippinginstackingoverflowexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollprevioussiblingpreventsinclusivenessexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollrelativeinclippinginscrollerinclippingexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollrelativeinclippinginscrollerinrelativeclippingexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollrelativeindivinoverflowscrollexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt</a></li>
<li><a href="#branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollscrolledcontentshaspaintedcontentexpectedtxt">branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari608124branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/ChangeLog (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/ChangeLog    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/ChangeLog       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,5 +1,263 @@
</span><span class="cx"> 2019-05-15  Kocsen Chung  <kocsen_chung@apple.com>
</span><span class="cx"> 
</span><ins>+        Cherry-pick r245170. rdar://problem/50445998
+
+    Implement backing-sharing in 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 Antti Koivisto.
+    Source/WebCore:
+    
+    This change introduces the concept of layers that share backing store for compositing. A layer
+    which is sharing its backing store 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 backing-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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
+           compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
+           compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
+           compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
+           compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
+           compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
+           compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
+           compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
+           compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
+           compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
+           compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
+           compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
+           compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
+           compositing/shared-backing/partial-compositing-update.html
+           compositing/shared-backing/partial-compositing-update2.html
+           compositing/shared-backing/remove-sharing-layer.html
+           compositing/shared-backing/sharing-cached-clip-rects.html
+    
+    * rendering/RenderLayer.cpp:
+    (WebCore::RenderLayer::~RenderLayer):
+    (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
+    (WebCore::RenderLayer::setBackingProviderLayer):
+    (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
+    (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
+    (WebCore::RenderLayer::clippingRootForPainting const):
+    (WebCore::RenderLayer::clipToRect):
+    (WebCore::RenderLayer::paintLayer):
+    (WebCore::RenderLayer::updateClipRects):
+    (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
+    (WebCore::RenderLayer::calculateClipRects const):
+    (WebCore::outputPaintOrderTreeLegend):
+    (WebCore::outputPaintOrderTreeRecursive):
+    (WebCore::inContainingBlockChain): Deleted.
+    * rendering/RenderLayer.h:
+    * rendering/RenderLayerBacking.cpp:
+    (WebCore::RenderLayerBacking::willBeDestroyed):
+    (WebCore::clearBackingSharingLayerProviders):
+    (WebCore::RenderLayerBacking::setBackingSharingLayers):
+    (WebCore::RenderLayerBacking::removeBackingSharingLayer):
+    (WebCore::RenderLayerBacking::clearBackingSharingLayers):
+    (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::stateForPaintOrderChildren const):
+    (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
+    (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
+    (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
+    (WebCore::RenderLayerCompositor::updateCompositingLayers):
+    (WebCore::backingProviderLayerCanIncludeLayer):
+    (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+    (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
+    (WebCore::RenderLayerCompositor::updateBacking):
+    (WebCore::RenderLayerCompositor::layerWillBeRemoved):
+    (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
+    * rendering/RenderLayerCompositor.h:
+    * rendering/RenderTreeAsText.cpp:
+    
+    LayoutTests:
+    
+    New tests for backing sharing, and new baselines of tests whose behavior is changed.
+    
+    Scrolling tree tests that would be invalidate by sharing are changed to defeat sharing by adding
+    compositing layers early in stacking order.
+    
+    * 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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
+    * compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html: Added.
+    * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html: Added.
+    * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html.
+    * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html: Added.
+    * compositing/shared-backing/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-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html: Added.
+    * compositing/shared-backing/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-backing/overflow-scroll/scrolled-contents-has-painted-content.html: Added.
+    * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html: Added.
+    * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-clipping.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-repaint.html: Added.
+    * compositing/shared-backing/partial-compositing-update-expected.txt: Added.
+    * compositing/shared-backing/partial-compositing-update.html: Added.
+    * compositing/shared-backing/partial-compositing-update2-expected.txt: Added.
+    * compositing/shared-backing/partial-compositing-update2.html: Added.
+    * compositing/shared-backing/remove-sharing-layer-expected.txt: Added.
+    * compositing/shared-backing/remove-sharing-layer.html: Added.
+    * compositing/shared-backing/sharing-cached-clip-rects-expected.txt: Added.
+    * compositing/shared-backing/sharing-cached-clip-rects.html: Added.
+    * platform/ios-wk2/TestExpectations:
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/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-backing/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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-05-09  Simon Fraser  <simon.fraser@apple.com>
+
+            Implement backing-sharing in 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 Antti Koivisto.
+
+            New tests for backing sharing, and new baselines of tests whose behavior is changed.
+
+            Scrolling tree tests that would be invalidate by sharing are changed to defeat sharing by adding
+            compositing layers early in stacking order.
+
+            * 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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
+            * compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html: Added.
+            * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html: Added.
+            * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html.
+            * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html: Added.
+            * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html: Added.
+            * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html: Added.
+            * compositing/shared-backing/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-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html: Added.
+            * compositing/shared-backing/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-backing/overflow-scroll/scrolled-contents-has-painted-content.html: Added.
+            * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html: Added.
+            * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-clipping.html: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt: Added.
+            * compositing/shared-backing/overflow-scroll/shared-layer-repaint.html: Added.
+            * compositing/shared-backing/partial-compositing-update-expected.txt: Added.
+            * compositing/shared-backing/partial-compositing-update.html: Added.
+            * compositing/shared-backing/partial-compositing-update2-expected.txt: Added.
+            * compositing/shared-backing/partial-compositing-update2.html: Added.
+            * compositing/shared-backing/remove-sharing-layer-expected.txt: Added.
+            * compositing/shared-backing/remove-sharing-layer.html: Added.
+            * compositing/shared-backing/sharing-cached-clip-rects-expected.txt: Added.
+            * compositing/shared-backing/sharing-cached-clip-rects.html: Added.
+            * platform/ios-wk2/TestExpectations:
+            * platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
+            * platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
+            * platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
+            * platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
+            * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
+            * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
+            * platform/ios-wk2/compositing/shared-backing/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-backing/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-15  Kocsen Chung  <kocsen_chung@apple.com>
+
</ins><span class="cx">         Cherry-pick r245317. rdar://problem/50291989
</span><span class="cx"> 
</span><span class="cx">     Missing cursor/caret showing in search field on google.com
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/TestExpectations (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/TestExpectations     2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/TestExpectations        2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -59,6 +59,9 @@
</span><span class="cx"> editing/pasteboard/mac [ Skip ]
</span><span class="cx"> fast/media/ios [ Skip ]
</span><span class="cx"> 
</span><ins>+# Requires async overflow scrolling
+compositing/shared-backing/overflow-scroll [ Skip ]
+
</ins><span class="cx"> # WebKit2 only.
</span><span class="cx"> printing/printing-events.html [ Skip ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositinggeometrylimitlayerboundsclippingancestorexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt       2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">     (GraphicsLayer
</span><span class="cx">       (bounds 785.00 2618.00)
</span><span class="cx">       (contentsOpaque 1)
</span><del>-      (children 6
</del><ins>+      (children 3
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 21.00 21.00)
</span><span class="cx">           (bounds 100.00 100.00)
</span><span class="lines">@@ -23,54 +23,16 @@
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><span class="cx">           (offsetFromRenderer width=0 height=100)
</span><del>-          (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)
</del><span class="cx">           (position 28.00 250.00)
</span><span class="cx">           (bounds 185.00 200.00)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><span class="cx">               (offsetFromRenderer width=0 height=100)
</span><del>-              (bounds 110.00 200.00)
-              (contentsOpaque 1)
</del><ins>+              (bounds 149.00 200.00)
</ins><span class="cx">               (drawsContent 1)
</span><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><del>-        (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)
-              (drawsContent 1)
-            )
-          )
-        )
</del><span class="cx">       )
</span><span class="cx">     )
</span><span class="cx">   )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositinglayercreationoverflowscrolloverlapexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt      2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">     (GraphicsLayer
</span><span class="cx">       (bounds 800.00 600.00)
</span><span class="cx">       (contentsOpaque 1)
</span><del>-      (children 3
</del><ins>+      (children 2
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 8.00 8.00)
</span><span class="cx">           (bounds 30.00 30.00)
</span><span class="lines">@@ -15,18 +15,6 @@
</span><span class="cx">           (bounds 306.00 206.00)
</span><span class="cx">           (drawsContent 1)
</span><span class="cx">         )
</span><del>-        (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)
-            )
-          )
-        )
</del><span class="cx">       )
</span><span class="cx">     )
</span><span class="cx">   )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositinglayercreationoverflowscrolloverlaphtml"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html      2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/layer-creation/overflow-scroll-overlap.html 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">           document.getElementById('results').innerText = window.internals.layerTreeAsText(document);
</span><span class="cx">           testRunner.notifyDone();
</span><span class="cx">         }
</span><del>-      }, 150);
</del><ins>+      }, 0);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     window.addEventListener('load', doTest, false);
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingoverflowscrollingcontentcliptoviewporthtml"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html 2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">       height: 1200px;
</span><span class="cx">       background: silver;
</span><span class="cx">       border: 2px solid blue;
</span><del>-      z-index: 0;
</del><ins>+      transform: translateZ(0);
</ins><span class="cx">     }
</span><span class="cx">   </style>
</span><span class="cx">   <script>
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingrtlrtlscrollingwithtransformeddescendantsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt      2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx">     (GraphicsLayer
</span><span class="cx">       (bounds 800.00 600.00)
</span><span class="cx">       (contentsOpaque 1)
</span><del>-      (children 4
</del><ins>+      (children 3
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 8.00 8.00)
</span><span class="cx">           (bounds 404.00 223.00)
</span><span class="lines">@@ -30,18 +30,6 @@
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (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
</del><span class="cx">           (offsetFromRenderer width=-96 height=0)
</span><span class="cx">           (position 10.00 10.00)
</span><span class="cx">           (bounds 400.00 204.00)
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollabsoluteinstackingrelativeinscrollerexpectedtxtfromrev245386branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt (from rev 245386, branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt) (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt                            (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+relativeabsolute
+(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)
+          (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)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollabsoluteinstackingrelativeinscrollerhtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html                            (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollcompositedabsoluteinabsoluteinrelativeinscrollerexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt                              (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+(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)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollcompositedabsoluteinabsoluteinrelativeinscrollerhtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html                              (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollnestedabsolutewithclippinginstackingoverflowexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt                           (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+(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)
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollnestedabsolutewithclippinginstackingoverflowhtmlfromrev245386branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinscoverflowhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html (from rev 245386, branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html) (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html                           (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+<!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="inner absolute"></div>
+        </div>
+        <div class="spacer"></div>
+    </div>
+<pre id="layers"></pre>
+</body>
+</html>
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollprevioussiblingpreventsinclusivenessexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt                              (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+(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)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollprevioussiblingpreventsinclusivenesshtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html                              (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinclippingexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt                         (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+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)
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinclippinghtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html                         (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinrelativeclippingexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+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)
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeinclippinginscrollerinrelativeclippinghtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeindivinoverflowscrollexpectedtxtfromrev245386branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt (from rev 245386, branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt) (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt                           (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+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)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollrelativeindivinoverflowscrollhtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html                           (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+<!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>
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentshaspaintedcontentexpectedtxtfromrev245386branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt (from rev 245386, branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt) (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+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)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentshaspaintedcontenthtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentsunconstrainedclipexpectedhtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollscrolledcontentsunconstrainedcliphtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html                         (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerclippingexpectedhtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html                               (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerclippinghtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping.html                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-clipping.html   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayercompositedboundsexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt                               (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+(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)
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayercompositedboundshtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html                               (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayernestedrelativestackingexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+(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)
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayernestedrelativestackinghtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerrepaintexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt                         (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+(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)
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingoverflowscrollsharedlayerrepainthtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint.html                         (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint.html    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdateexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update-expected.txt                           (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update-expected.txt      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+(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 302.00 302.00)
+          (drawsContent 1)
+          (children 2
+            (GraphicsLayer
+              (position 11.00 11.00)
+              (bounds 280.00 50.00)
+              (contentsOpaque 1)
+            )
+            (GraphicsLayer
+              (position 11.00 51.00)
+              (bounds 280.00 224.00)
+              (drawsContent 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdatehtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update.html                           (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update.html      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    <style>
+        
+        .container {
+            position: relative;
+            margin: 20px;
+            width: 300px;
+            height: 300px;
+            border: 1px solid black;
+        }
+        
+        .composited {
+            transform: translateZ(0);
+        }
+        
+        .relative {
+            position: relative;
+            top: -20px;
+            margin: 10px;
+            padding: 10px;
+            border: 2px solid orange;
+        }
+        
+        .clipping {
+            overflow: hidden;
+            height: 200px;
+        }
+        
+        .trigger {
+            margin: 10px;
+            height: 50px;
+            background-color: silver;
+        }
+        
+        .composited.relative {
+            height: 200px;
+        }
+        
+        .absolute {
+            position: absolute;
+            margin: 10px;
+            height: 10px;
+            width: 100px;
+            background-color: silver;
+        }
+        
+        body.changed .absolute {
+            width: 120px;
+        }
+    </style>
+    <script>
+        if (window.testRunner) {
+            testRunner.waitUntilDone();
+            testRunner.dumpAsText();
+        }
+
+        window.addEventListener('load', () => {
+            setTimeout(() => {
+                document.body.classList.add('changed');
+                if (window.internals)
+                    document.getElementById('layers').textContent = internals.layerTreeAsText(document);
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 0);
+        }, false);
+    </script>
+</head>
+<body>
+    <div class="composited container">
+        <div class="composited trigger"></div>
+        <div class="relative clipping">
+            <div class="absolute" style="top: 10px;"></div>
+            <div class="absolute" style="top: 30px;"></div>
+            <div class="absolute" style="top: 50px;"></div>
+        </div>
+    </div>
+<pre id="layers"></pre>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdate2expectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2-expected.txt                          (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2-expected.txt     2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+(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 302.00 302.00)
+          (drawsContent 1)
+          (children 2
+            (GraphicsLayer
+              (position 11.00 11.00)
+              (bounds 280.00 50.00)
+              (contentsOpaque 1)
+            )
+            (GraphicsLayer
+              (position 11.00 51.00)
+              (bounds 280.00 224.00)
+              (drawsContent 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingpartialcompositingupdate2html"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2.html                          (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/partial-compositing-update2.html     2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,83 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    <style>
+        
+        .container {
+            position: relative;
+            margin: 20px;
+            width: 300px;
+            height: 300px;
+            border: 1px solid black;
+        }
+        
+        .composited {
+            transform: translateZ(0);
+        }
+        
+        .relative {
+            position: relative;
+            top: -20px;
+            margin: 10px;
+            padding: 10px;
+            border: 2px solid orange;
+        }
+        
+        .clipping {
+            overflow: hidden;
+            height: 200px;
+        }
+        
+        .trigger {
+            margin: 10px;
+            height: 50px;
+            background-color: silver;
+        }
+        
+        .composited.relative {
+            height: 200px;
+        }
+        
+        .absolute {
+            position: absolute;
+            margin: 10px;
+            height: 10px;
+            width: 100px;
+            background-color: silver;
+        }
+        
+        body.changed .changing {
+            width: 120px;
+        }
+    </style>
+    <script>
+        if (window.testRunner) {
+            testRunner.waitUntilDone();
+            testRunner.dumpAsText();
+        }
+
+        window.addEventListener('load', () => {
+            setTimeout(() => {
+                document.body.classList.add('changed');
+                if (window.internals)
+                    document.getElementById('layers').textContent = internals.layerTreeAsText(document);
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 0);
+        }, false);
+    </script>
+</head>
+<body>
+    <div class="composited container">
+        <div class="composited trigger"></div>
+        <div class="relative clipping">
+            <div class="relative changing"></div>
+            <div class="absolute" style="top: 10px;"></div>
+            <div class="absolute" style="top: 30px;"></div>
+            <div class="absolute" style="top: 50px;"></div>
+        </div>
+    </div>
+<pre id="layers"></pre>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingremovesharinglayerexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer-expected.txt                         (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer-expected.txt    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+This test should not crash or assert.
+
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingremovesharinglayerhtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer.html                         (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/remove-sharing-layer.html    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingsharingcachedcliprectsexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects-expected.txt                            (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects-expected.txt       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+This test should not assert in debug builds.
+
+relative
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestscompositingsharedbackingsharingcachedcliprectshtml"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects.html (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects.html                            (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/sharing-cached-clip-rects.html       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioscompositinggeometrylimitlayerboundsclippingancestorexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt  2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt     2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">     (GraphicsLayer
</span><span class="cx">       (bounds 800.00 2618.00)
</span><span class="cx">       (contentsOpaque 1)
</span><del>-      (children 6
</del><ins>+      (children 3
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 21.00 21.00)
</span><span class="cx">           (bounds 100.00 100.00)
</span><span class="lines">@@ -23,56 +23,16 @@
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><span class="cx">           (offsetFromRenderer width=0 height=100)
</span><del>-          (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)
</del><span class="cx">           (position 28.00 250.00)
</span><span class="cx">           (bounds 185.00 200.00)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><span class="cx">               (offsetFromRenderer width=0 height=100)
</span><del>-              (bounds 110.00 200.00)
-              (contentsOpaque 1)
</del><ins>+              (bounds 149.00 200.00)
</ins><span class="cx">               (drawsContent 1)
</span><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><del>-        (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)
-              (drawsContent 1)
-            )
-          )
-        )
</del><span class="cx">       )
</span><span class="cx">     )
</span><span class="cx">   )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioscompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendantsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">       (coverage rect 0.00, 0.00 800.00 x 600.00)
</span><span class="cx">       (intersects coverage rect 1)
</span><span class="cx">       (contentsScale 2.00)
</span><del>-      (children 6
</del><ins>+      (children 4
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 8.00 102.00)
</span><span class="cx">           (bounds 22.00 22.00)
</span><span class="lines">@@ -48,42 +48,15 @@
</span><span class="cx">           (contentsScale 2.00)
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (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)
</del><ins>+          (offsetFromRenderer width=-17 height=0)
+          (position -9.00 134.00)
+          (bounds 816.00 22.00)
</ins><span class="cx">           (drawsContent 1)
</span><del>-          (visible rect 0.00, 0.00 102.00 x 22.00)
-          (coverage rect -8.00, -134.00 800.00 x 600.00)
</del><ins>+          (visible rect 9.00, 0.00 800.00 x 22.00)
+          (coverage rect 9.00, -134.00 800.00 x 600.00)
</ins><span class="cx">           (intersects coverage rect 1)
</span><span class="cx">           (contentsScale 2.00)
</span><span class="cx">         )
</span><del>-        (GraphicsLayer
-          (offsetFromRenderer width=-9 height=0)
-          (position 0.00 135.00)
-          (bounds 807.00 20.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)
-          (intersects coverage rect 1)
-          (contentsScale 2.00)
-        )
</del><span class="cx">       )
</span><span class="cx">     )
</span><span class="cx">   )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioscompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendants2expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt   2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">       (coverage rect 0.00, 0.00 800.00 x 600.00)
</span><span class="cx">       (intersects coverage rect 1)
</span><span class="cx">       (contentsScale 2.00)
</span><del>-      (children 6
</del><ins>+      (children 4
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 8.00 102.00)
</span><span class="cx">           (bounds 22.00 22.00)
</span><span class="lines">@@ -48,41 +48,14 @@
</span><span class="cx">           (contentsScale 2.00)
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (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
</del><span class="cx">           (position 8.00 134.00)
</span><del>-          (bounds 102.00 22.00)
</del><ins>+          (bounds 799.00 22.00)
</ins><span class="cx">           (drawsContent 1)
</span><del>-          (visible rect 0.00, 0.00 102.00 x 22.00)
</del><ins>+          (visible rect 0.00, 0.00 792.00 x 22.00)
</ins><span class="cx">           (coverage rect -8.00, -134.00 800.00 x 600.00)
</span><span class="cx">           (intersects coverage rect 1)
</span><span class="cx">           (contentsScale 2.00)
</span><span class="cx">         )
</span><del>-        (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)
-        )
</del><span class="cx">       )
</span><span class="cx">     )
</span><span class="cx">   )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -15,7 +15,14 @@
</span><span class="cx">                 (GraphicsLayer
</span><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 320.00 1224.00)
</span><del>-                  (drawsContent 1)
</del><ins>+                  (children 1
+                    (GraphicsLayer
+                      (position 10.00 10.00)
+                      (bounds 284.00 1204.00)
+                      (contentsOpaque 1)
+                      (drawsContent 1)
+                    )
+                  )
</ins><span class="cx">                 )
</span><span class="cx">               )
</span><span class="cx">             )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2TestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/TestExpectations (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/TestExpectations    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/TestExpectations       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -7,6 +7,7 @@
</span><span class="cx"> #//////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> 
</span><span class="cx"> compositing/ios [ Pass ]
</span><ins>+compositing/shared-backing/overflow-scroll [ Pass ]
</ins><span class="cx"> fast/device-orientation [ Pass ]
</span><span class="cx"> fast/history/ios [ Pass ]
</span><span class="cx"> fast/scrolling/ios [ Pass ]
</span><span class="lines">@@ -1075,6 +1076,7 @@
</span><span class="cx"> webkit.org/b/153049 perf/array-binary-search.html [ Pass Failure Timeout ]
</span><span class="cx"> 
</span><span class="cx"> fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html [ Pass Failure ]
</span><ins>+webkit.org/b/197694 fast/scrolling/ios/overflow-scroll-overlap-4.html [ Failure ]
</ins><span class="cx"> 
</span><span class="cx"> webkit.org/b/157589 fast/text-autosizing/ios/text-autosizing-after-back.html [ Pass Timeout ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollabsoluteinstackingrelativeinscrollerexpectedtxtfromrev245386branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt (from rev 245386, branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt) (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt                           (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+relativeabsolute
+(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)
+          (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)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollcompositedabsoluteinabsoluteinrelativeinscrollerexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt                             (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt        2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+(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)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollnestedabsolutewithclippinginstackingoverflowexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt                          (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt     2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+(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)
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollprevioussiblingpreventsinclusivenessexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt                             (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt        2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+(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)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollrelativeinclippinginscrollerinclippingexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt                                (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+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)
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollrelativeinclippinginscrollerinrelativeclippingexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt                               (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+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)
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollrelativeindivinoverflowscrollexpectedtxtfromrev245386branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt (from rev 245386, branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt) (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt                          (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt     2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+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)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2compositingsharedbackingoverflowscrollscrolledcontentshaspaintedcontentexpectedtxtfromrev245386branchessafari608124branchLayoutTestsplatformioscompositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt (from rev 245386, branches/safari-608.1.24-branch/LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt) (0 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt                               (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+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)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreenestedabsoluteinabsoluteoverflowexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt       2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><del>-absabs
</del><ins>+abs
+abs
</ins><span class="cx"> 
</span><span class="cx"> (Frame scrolling node
</span><span class="cx">   (scrollable area size 800 600)
</span><span class="lines">@@ -13,10 +14,10 @@
</span><span class="cx">   (min layout viewport origin (0,0))
</span><span class="cx">   (max layout viewport origin (0,0))
</span><span class="cx">   (behavior for fixed 0)
</span><del>-  (children 3
</del><ins>+  (children 5
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 300 300)
</span><del>-      (contents size 381 500)
</del><ins>+      (contents size 381 530)
</ins><span class="cx">       (parent relative scrollable rect at (30,35) size 300x300)
</span><span class="cx">       (scrollable area parameters 
</span><span class="cx">         (horizontal scroll elasticity 1)
</span><span class="lines">@@ -28,6 +29,12 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><ins>+        (layer-position-at-last-layout (10,10))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
+    (Positioned node
+      (layout constraints 
</ins><span class="cx">         (layer-position-at-last-layout (50,50))
</span><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="lines">@@ -34,6 +41,12 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><ins>+        (layer-position-at-last-layout (62,82))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
+    (Positioned node
+      (layout constraints 
</ins><span class="cx">         (layer-position-at-last-layout (77,77))
</span><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreenestedabsoluteinrelativeinoverflowexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><del>-absabs
</del><ins>+abs
+abs
</ins><span class="cx"> 
</span><span class="cx"> (Frame scrolling node
</span><span class="cx">   (scrollable area size 800 600)
</span><span class="lines">@@ -13,10 +14,10 @@
</span><span class="cx">   (min layout viewport origin (0,0))
</span><span class="cx">   (max layout viewport origin (0,0))
</span><span class="cx">   (behavior for fixed 0)
</span><del>-  (children 4
</del><ins>+  (children 7
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 300 300)
</span><del>-      (contents size 300 526)
</del><ins>+      (contents size 300 556)
</ins><span class="cx">       (parent relative scrollable rect at (30,22) size 300x300)
</span><span class="cx">       (scrollable area parameters 
</span><span class="cx">         (horizontal scroll elasticity 1)
</span><span class="lines">@@ -27,22 +28,40 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (0,0))
</del><ins>+        (layer-position-at-last-layout (10,10))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (53,53))
</del><ins>+        (layer-position-at-last-layout (0,30))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (80,80))
</del><ins>+        (layer-position-at-last-layout (13,43))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (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)
+    )
</ins><span class="cx">   )
</span><span class="cx"> )
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreenestedabsoluteinscoverflowexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt     2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt        2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><del>-absabs
</del><ins>+abs
+abs
</ins><span class="cx"> 
</span><span class="cx"> (Frame scrolling node
</span><span class="cx">   (scrollable area size 800 600)
</span><span class="lines">@@ -16,7 +17,7 @@
</span><span class="cx">   (children 1
</span><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 300 300)
</span><del>-      (contents size 300 500)
</del><ins>+      (contents size 300 530)
</ins><span class="cx">       (parent relative scrollable rect at (30,22) size 300x300)
</span><span class="cx">       (scrollable area parameters 
</span><span class="cx">         (horizontal scroll elasticity 1)
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreepositionednodescomplexexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt   2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">   (min layout viewport origin (0,0))
</span><span class="cx">   (max layout viewport origin (0,229))
</span><span class="cx">   (behavior for fixed 0)
</span><del>-  (children 12
</del><ins>+  (children 19
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 220 170)
</span><span class="cx">       (contents size 220 1020)
</span><span class="lines">@@ -40,16 +40,22 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,30))
</del><ins>+        (layer-position-at-last-layout (20,40))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,50))
</del><ins>+        (layer-position-at-last-layout (10,60))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (10,80))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 220 170)
</span><span class="cx">       (contents size 220 1020)
</span><span class="lines">@@ -63,10 +69,16 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,30))
</del><ins>+        (layer-position-at-last-layout (20,40))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (10,60))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 220 170)
</span><span class="cx">       (contents size 220 1020)
</span><span class="lines">@@ -78,6 +90,12 @@
</span><span class="cx">         (vertical scrollbar mode 0)
</span><span class="cx">         (has enabled vertical scrollbar 1))
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (20,40))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 220 170)
</span><span class="cx">       (contents size 220 1020)
</span><span class="lines">@@ -89,6 +107,12 @@
</span><span class="cx">         (vertical scrollbar mode 0)
</span><span class="cx">         (has enabled vertical scrollbar 1))
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (20,40))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 220 170)
</span><span class="cx">       (contents size 220 1020)
</span><span class="lines">@@ -102,16 +126,28 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,30))
</del><ins>+        (layer-position-at-last-layout (20,40))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (110,50))
</del><ins>+        (layer-position-at-last-layout (10,60))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (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)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 220 170)
</span><span class="cx">       (contents size 220 1020)
</span><span class="lines">@@ -125,13 +161,19 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,30))
</del><ins>+        (layer-position-at-last-layout (20,40))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><ins>+    )
+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (10,60))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
</ins><span class="cx">       (children 1
</span><span class="cx">         (Positioned node
</span><span class="cx">           (layout constraints 
</span><del>-            (layer-position-at-last-layout (79,20))
</del><ins>+            (layer-position-at-last-layout (79,50))
</ins><span class="cx">             (positioning-behavior stationary))
</span><span class="cx">           (related overflow nodes 1)
</span><span class="cx">         )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformmaccompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendantsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">       (coverage rect 0.00, 0.00 800.00 x 585.00)
</span><span class="cx">       (intersects coverage rect 1)
</span><span class="cx">       (contentsScale 1.00)
</span><del>-      (children 6
</del><ins>+      (children 4
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 8.00 96.00)
</span><span class="cx">           (bounds 22.00 22.00)
</span><span class="lines">@@ -48,42 +48,15 @@
</span><span class="cx">           (contentsScale 1.00)
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (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)
</del><ins>+          (offsetFromRenderer width=-16 height=0)
+          (position -8.00 128.00)
+          (bounds 815.00 20.00)
</ins><span class="cx">           (drawsContent 1)
</span><del>-          (visible rect 0.00, 0.00 102.00 x 20.00)
-          (coverage rect -8.00, -128.00 800.00 x 585.00)
</del><ins>+          (visible rect 8.00, 0.00 800.00 x 20.00)
+          (coverage rect 8.00, -128.00 800.00 x 585.00)
</ins><span class="cx">           (intersects coverage rect 1)
</span><span class="cx">           (contentsScale 1.00)
</span><span class="cx">         )
</span><del>-        (GraphicsLayer
-          (offsetFromRenderer width=-9 height=0)
-          (position 0.00 129.00)
-          (bounds 807.00 18.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)
-          (intersects coverage rect 1)
-          (contentsScale 1.00)
-        )
</del><span class="cx">       )
</span><span class="cx">     )
</span><span class="cx">   )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformmaccompositingoverflowclippingbehaviourchangeisnotpropagatedtodescendants2expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt   2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">       (coverage rect 0.00, 0.00 800.00 x 585.00)
</span><span class="cx">       (intersects coverage rect 1)
</span><span class="cx">       (contentsScale 1.00)
</span><del>-      (children 6
</del><ins>+      (children 4
</ins><span class="cx">         (GraphicsLayer
</span><span class="cx">           (position 8.00 96.00)
</span><span class="cx">           (bounds 22.00 22.00)
</span><span class="lines">@@ -48,41 +48,14 @@
</span><span class="cx">           (contentsScale 1.00)
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (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
</del><span class="cx">           (position 8.00 128.00)
</span><del>-          (bounds 102.00 20.00)
</del><ins>+          (bounds 799.00 20.00)
</ins><span class="cx">           (drawsContent 1)
</span><del>-          (visible rect 0.00, 0.00 102.00 x 20.00)
</del><ins>+          (visible rect 0.00, 0.00 792.00 x 20.00)
</ins><span class="cx">           (coverage rect -8.00, -128.00 800.00 x 585.00)
</span><span class="cx">           (intersects coverage rect 1)
</span><span class="cx">           (contentsScale 1.00)
</span><span class="cx">         )
</span><del>-        (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)
-        )
</del><span class="cx">       )
</span><span class="cx">     )
</span><span class="cx">   )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformmacwk1compositingoverflowscrollingcontentcliptoviewportexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt        2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk1/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1 +1,25 @@
</span><ins>+(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)
+            )
+          )
+        )
+      )
+    )
+  )
+)
</ins><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsplatformmacwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk2/TestExpectations (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk2/TestExpectations    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/platform/mac-wk2/TestExpectations       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -5,6 +5,7 @@
</span><span class="cx"> # Platform-specific directories. Skipped globally, then re-enabled here.
</span><span class="cx"> #//////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> 
</span><ins>+compositing/shared-backing/overflow-scroll [ Pass ]
</ins><span class="cx"> editing/find [ Pass ]
</span><span class="cx"> editing/undo-manager [ Pass ]
</span><span class="cx"> fast/forms/select/mac-wk2 [ Pass ]
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinabsoluteoverflowexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt        2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><del>-absabs
</del><ins>+abs
+abs
</ins><span class="cx"> 
</span><span class="cx"> (Frame scrolling node
</span><span class="cx">   (scrollable area size 800 600)
</span><span class="lines">@@ -13,10 +14,10 @@
</span><span class="cx">   (min layout viewport origin (0,0))
</span><span class="cx">   (max layout viewport origin (0,0))
</span><span class="cx">   (behavior for fixed 0)
</span><del>-  (children 3
</del><ins>+  (children 5
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 285 285)
</span><del>-      (contents size 381 500)
</del><ins>+      (contents size 381 530)
</ins><span class="cx">       (parent relative scrollable rect at (30,35) size 285x285)
</span><span class="cx">       (scrollable area parameters 
</span><span class="cx">         (horizontal scroll elasticity 0)
</span><span class="lines">@@ -28,6 +29,12 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><ins>+        (layer-position-at-last-layout (10,10))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
+    (Positioned node
+      (layout constraints 
</ins><span class="cx">         (layer-position-at-last-layout (50,50))
</span><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="lines">@@ -34,6 +41,12 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><ins>+        (layer-position-at-last-layout (62,80))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
+    (Positioned node
+      (layout constraints 
</ins><span class="cx">         (layer-position-at-last-layout (77,77))
</span><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinabsoluteoverflowhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html        2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html   2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -35,6 +35,13 @@
</span><span class="cx">             height: 500px;
</span><span class="cx">             background-image: repeating-linear-gradient(white, silver 200px);
</span><span class="cx">         }
</span><ins>+        
+        .sharing-preventer {
+            transform: translateZ(0);
+            margin: 10px;
+            width: 10px;
+            height: 10px;
+        }
</ins><span class="cx">     </style>
</span><span class="cx">     <script>
</span><span class="cx">         if (window.testRunner)
</span><span class="lines">@@ -48,7 +55,9 @@
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">     <div class="scroller">
</span><ins>+        <div class="sharing-preventer"></div>
</ins><span class="cx">         <div class="absolute">abs
</span><ins>+            <div class="sharing-preventer"></div>
</ins><span class="cx">             <div class="inner absolute">abs</div>
</span><span class="cx">         </div>
</span><span class="cx">         <div class="scrollcontent"></div>
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinrelativeinoverflowexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt     2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt        2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><del>-absabs
</del><ins>+abs
+abs
</ins><span class="cx"> 
</span><span class="cx"> (Frame scrolling node
</span><span class="cx">   (scrollable area size 800 600)
</span><span class="lines">@@ -13,10 +14,10 @@
</span><span class="cx">   (min layout viewport origin (0,0))
</span><span class="cx">   (max layout viewport origin (0,0))
</span><span class="cx">   (behavior for fixed 0)
</span><del>-  (children 4
</del><ins>+  (children 7
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 285 285)
</span><del>-      (contents size 285 526)
</del><ins>+      (contents size 285 556)
</ins><span class="cx">       (parent relative scrollable rect at (30,22) size 285x285)
</span><span class="cx">       (scrollable area parameters 
</span><span class="cx">         (horizontal scroll elasticity 0)
</span><span class="lines">@@ -27,22 +28,40 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (0,0))
</del><ins>+        (layer-position-at-last-layout (10,10))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (53,53))
</del><ins>+        (layer-position-at-last-layout (0,30))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (80,80))
</del><ins>+        (layer-position-at-last-layout (13,43))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (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)
+    )
</ins><span class="cx">   )
</span><span class="cx"> )
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinrelativeinoverflowhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html     2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html        2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -40,6 +40,13 @@
</span><span class="cx">             height: 500px;
</span><span class="cx">             background-image: repeating-linear-gradient(white, silver 200px);
</span><span class="cx">         }
</span><ins>+
+        .sharing-preventer {
+            transform: translateZ(0);
+            margin: 10px;
+            width: 10px;
+            height: 10px;
+        }
</ins><span class="cx">     </style>
</span><span class="cx">     <script>
</span><span class="cx">         if (window.testRunner)
</span><span class="lines">@@ -54,8 +61,11 @@
</span><span class="cx"> <body>
</span><span class="cx"> 
</span><span class="cx">     <div class="scroller">
</span><ins>+        <div class="sharing-preventer"></div>
</ins><span class="cx">         <div class="relative">
</span><ins>+            <div class="sharing-preventer"></div>
</ins><span class="cx">             <div class="absolute">abs
</span><ins>+                <div class="sharing-preventer"></div>
</ins><span class="cx">                 <div class="inner absolute">abs</div>
</span><span class="cx">             </div>
</span><span class="cx">         </div>
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinscoverflowexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt      2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><del>-absabs
</del><ins>+abs
+abs
</ins><span class="cx"> 
</span><span class="cx"> (Frame scrolling node
</span><span class="cx">   (scrollable area size 800 600)
</span><span class="lines">@@ -16,7 +17,7 @@
</span><span class="cx">   (children 1
</span><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 285 285)
</span><del>-      (contents size 285 500)
</del><ins>+      (contents size 285 530)
</ins><span class="cx">       (parent relative scrollable rect at (30,22) size 285x285)
</span><span class="cx">       (scrollable area parameters 
</span><span class="cx">         (horizontal scroll elasticity 0)
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreenestedabsoluteinscoverflowhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html      2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html 2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -35,6 +35,13 @@
</span><span class="cx">             height: 500px;
</span><span class="cx">             background-image: repeating-linear-gradient(white, silver 200px);
</span><span class="cx">         }
</span><ins>+
+        .sharing-preventer {
+            transform: translateZ(0);
+            margin: 10px;
+            width: 10px;
+            height: 10px;
+        }
</ins><span class="cx">     </style>
</span><span class="cx">     <script>
</span><span class="cx">         if (window.testRunner)
</span><span class="lines">@@ -48,7 +55,9 @@
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx">     <div class="scroller">
</span><ins>+        <div class="sharing-preventer"></div>
</ins><span class="cx">         <div class="absolute">abs
</span><ins>+            <div class="sharing-preventer"></div>
</ins><span class="cx">             <div class="inner absolute">abs</div>
</span><span class="cx">         </div>
</span><span class="cx">         <div class="scrollcontent"></div>
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreepositionednodescomplexexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">   (min layout viewport origin (0,0))
</span><span class="cx">   (max layout viewport origin (0,229))
</span><span class="cx">   (behavior for fixed 0)
</span><del>-  (children 12
</del><ins>+  (children 19
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 205 155)
</span><span class="cx">       (contents size 210 1020)
</span><span class="lines">@@ -42,16 +42,22 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,28))
</del><ins>+        (layer-position-at-last-layout (20,38))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,46))
</del><ins>+        (layer-position-at-last-layout (10,58))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (10,76))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 205 155)
</span><span class="cx">       (contents size 210 1020)
</span><span class="lines">@@ -66,10 +72,16 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,28))
</del><ins>+        (layer-position-at-last-layout (20,38))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (10,58))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 205 155)
</span><span class="cx">       (contents size 205 1020)
</span><span class="lines">@@ -81,6 +93,12 @@
</span><span class="cx">         (vertical scrollbar mode 0)
</span><span class="cx">         (has enabled vertical scrollbar 1))
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (20,38))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 205 155)
</span><span class="cx">       (contents size 205 1020)
</span><span class="lines">@@ -92,6 +110,12 @@
</span><span class="cx">         (vertical scrollbar mode 0)
</span><span class="cx">         (has enabled vertical scrollbar 1))
</span><span class="cx">     )
</span><ins>+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (20,38))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 205 155)
</span><span class="cx">       (contents size 210 1020)
</span><span class="lines">@@ -106,16 +130,28 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,28))
</del><ins>+        (layer-position-at-last-layout (20,38))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (110,46))
</del><ins>+        (layer-position-at-last-layout (10,58))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><span class="cx">     )
</span><ins>+    (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)
+    )
</ins><span class="cx">     (Overflow scrolling node
</span><span class="cx">       (scrollable area size 205 155)
</span><span class="cx">       (contents size 205 1020)
</span><span class="lines">@@ -129,13 +165,19 @@
</span><span class="cx">     )
</span><span class="cx">     (Positioned node
</span><span class="cx">       (layout constraints 
</span><del>-        (layer-position-at-last-layout (10,28))
</del><ins>+        (layer-position-at-last-layout (20,38))
</ins><span class="cx">         (positioning-behavior moves))
</span><span class="cx">       (related overflow nodes 1)
</span><ins>+    )
+    (Positioned node
+      (layout constraints 
+        (layer-position-at-last-layout (10,58))
+        (positioning-behavior moves))
+      (related overflow nodes 1)
</ins><span class="cx">       (children 1
</span><span class="cx">         (Positioned node
</span><span class="cx">           (layout constraints 
</span><del>-            (layer-position-at-last-layout (79,18))
</del><ins>+            (layer-position-at-last-layout (79,48))
</ins><span class="cx">             (positioning-behavior stationary))
</span><span class="cx">           (related overflow nodes 1)
</span><span class="cx">         )
</span></span></pre></div>
<a id="branchessafari608124branchLayoutTestsscrollingcoordinatorscrollingtreepositionednodescomplexhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">         .absolute {
</span><span class="cx">             position: absolute;
</span><span class="cx">             left: 100px;
</span><ins>+            transform: translateZ(0);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         .composited {
</span><span class="lines">@@ -57,6 +58,13 @@
</span><span class="cx">         .scrolling-content {
</span><span class="cx">             height: 1000px;
</span><span class="cx">         }
</span><ins>+
+        .sharing-preventer {
+            transform: translateZ(0);
+            margin: 10px;
+            width: 10px;
+            height: 10px;
+        }
</ins><span class="cx">         </style>
</span><span class="cx">         <script>
</span><span class="cx">         if (window.testRunner)
</span><span class="lines">@@ -76,8 +84,10 @@
</span><span class="cx">             <div class="scroller">
</span><span class="cx">                 <div class="scrolling-content">
</span><span class="cx">                     Scrolling content
</span><ins>+                    <div class="sharing-preventer"></div>
</ins><span class="cx">                     <div class="stacking">
</span><span class="cx">                         Stacking
</span><ins>+                        <div class="sharing-preventer"></div>
</ins><span class="cx">                         <div class="absolute box"></div>
</span><span class="cx">                     </div>
</span><span class="cx">                 </div>
</span><span class="lines">@@ -88,8 +98,10 @@
</span><span class="cx">             <div class="scroller">
</span><span class="cx">                 <div class="scrolling-content">
</span><span class="cx">                     Scrolling content
</span><ins>+                    <div class="sharing-preventer"></div>
</ins><span class="cx">                     <div class="containing">
</span><span class="cx">                         Containing
</span><ins>+                        <div class="sharing-preventer"></div>
</ins><span class="cx">                         <div class="absolute box"></div>
</span><span class="cx">                     </div>
</span><span class="cx">                 </div>
</span><span class="lines">@@ -100,6 +112,7 @@
</span><span class="cx">             <div class="scroller">
</span><span class="cx">                 <div class="scrolling-content">
</span><span class="cx">                     Scrolling content
</span><ins>+                    <div class="sharing-preventer"></div>
</ins><span class="cx">                     <div class="absolute box"></div>
</span><span class="cx">                 </div>
</span><span class="cx">             </div>
</span><span class="lines">@@ -113,6 +126,7 @@
</span><span class="cx">                     <div class="scroller">
</span><span class="cx">                         <div class="scrolling-content">
</span><span class="cx">                             Scrolling content
</span><ins>+                            <div class="sharing-preventer"></div>
</ins><span class="cx">                             <div class="absolute box"></div>
</span><span class="cx">                         </div>
</span><span class="cx">                     </div>
</span><span class="lines">@@ -123,10 +137,12 @@
</span><span class="cx">             <div class="scroller">
</span><span class="cx">                 <div class="scrolling-content">
</span><span class="cx">                     Scrolling content
</span><ins>+                    <div class="sharing-preventer"></div>
</ins><span class="cx">                     <div class="stacking">
</span><span class="cx">                         Stacking
</span><span class="cx">                         <div class="containing">
</span><span class="cx">                             Containing
</span><ins>+                            <div class="sharing-preventer"></div>
</ins><span class="cx">                             <div class="absolute box"></div>
</span><span class="cx">                         </div>
</span><span class="cx">                     </div>
</span><span class="lines">@@ -137,10 +153,12 @@
</span><span class="cx">             <div class="scroller">
</span><span class="cx">                 <div class="scrolling-content">
</span><span class="cx">                     Scrolling content
</span><ins>+                    <div class="sharing-preventer"></div>
</ins><span class="cx">                     <div class="containing">
</span><span class="cx">                         Containing
</span><span class="cx">                         <div class="stacking">
</span><span class="cx">                             Stacking
</span><ins>+                            <div class="sharing-preventer"></div>
</ins><span class="cx">                             <div class="absolute box"></div>
</span><span class="cx">                         </div>
</span><span class="cx">                     </div>
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/ChangeLog (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/ChangeLog 2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/ChangeLog    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -1,5 +1,273 @@
</span><span class="cx"> 2019-05-15  Kocsen Chung  <kocsen_chung@apple.com>
</span><span class="cx"> 
</span><ins>+        Cherry-pick r245170. rdar://problem/50445998
+
+    Implement backing-sharing in 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 Antti Koivisto.
+    Source/WebCore:
+    
+    This change introduces the concept of layers that share backing store for compositing. A layer
+    which is sharing its backing store 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 backing-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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
+           compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
+           compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
+           compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
+           compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
+           compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
+           compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
+           compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
+           compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
+           compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
+           compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
+           compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
+           compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
+           compositing/shared-backing/partial-compositing-update.html
+           compositing/shared-backing/partial-compositing-update2.html
+           compositing/shared-backing/remove-sharing-layer.html
+           compositing/shared-backing/sharing-cached-clip-rects.html
+    
+    * rendering/RenderLayer.cpp:
+    (WebCore::RenderLayer::~RenderLayer):
+    (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
+    (WebCore::RenderLayer::setBackingProviderLayer):
+    (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
+    (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
+    (WebCore::RenderLayer::clippingRootForPainting const):
+    (WebCore::RenderLayer::clipToRect):
+    (WebCore::RenderLayer::paintLayer):
+    (WebCore::RenderLayer::updateClipRects):
+    (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
+    (WebCore::RenderLayer::calculateClipRects const):
+    (WebCore::outputPaintOrderTreeLegend):
+    (WebCore::outputPaintOrderTreeRecursive):
+    (WebCore::inContainingBlockChain): Deleted.
+    * rendering/RenderLayer.h:
+    * rendering/RenderLayerBacking.cpp:
+    (WebCore::RenderLayerBacking::willBeDestroyed):
+    (WebCore::clearBackingSharingLayerProviders):
+    (WebCore::RenderLayerBacking::setBackingSharingLayers):
+    (WebCore::RenderLayerBacking::removeBackingSharingLayer):
+    (WebCore::RenderLayerBacking::clearBackingSharingLayers):
+    (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::stateForPaintOrderChildren const):
+    (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
+    (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
+    (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
+    (WebCore::RenderLayerCompositor::updateCompositingLayers):
+    (WebCore::backingProviderLayerCanIncludeLayer):
+    (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+    (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
+    (WebCore::RenderLayerCompositor::updateBacking):
+    (WebCore::RenderLayerCompositor::layerWillBeRemoved):
+    (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
+    * rendering/RenderLayerCompositor.h:
+    * rendering/RenderTreeAsText.cpp:
+    
+    LayoutTests:
+    
+    New tests for backing sharing, and new baselines of tests whose behavior is changed.
+    
+    Scrolling tree tests that would be invalidate by sharing are changed to defeat sharing by adding
+    compositing layers early in stacking order.
+    
+    * 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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
+    * compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html: Added.
+    * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html: Added.
+    * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html.
+    * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html: Added.
+    * compositing/shared-backing/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-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html: Added.
+    * compositing/shared-backing/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-backing/overflow-scroll/scrolled-contents-has-painted-content.html: Added.
+    * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip-expected.html: Added.
+    * compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-clipping-expected.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-clipping.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt: Added.
+    * compositing/shared-backing/overflow-scroll/shared-layer-repaint.html: Added.
+    * compositing/shared-backing/partial-compositing-update-expected.txt: Added.
+    * compositing/shared-backing/partial-compositing-update.html: Added.
+    * compositing/shared-backing/partial-compositing-update2-expected.txt: Added.
+    * compositing/shared-backing/partial-compositing-update2.html: Added.
+    * compositing/shared-backing/remove-sharing-layer-expected.txt: Added.
+    * compositing/shared-backing/remove-sharing-layer.html: Added.
+    * compositing/shared-backing/sharing-cached-clip-rects-expected.txt: Added.
+    * compositing/shared-backing/sharing-cached-clip-rects.html: Added.
+    * platform/ios-wk2/TestExpectations:
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt: Copied from LayoutTests/platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt: Added.
+    * platform/ios-wk2/compositing/shared-backing/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-backing/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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-05-09  Simon Fraser  <simon.fraser@apple.com>
+
+            Implement backing-sharing in 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 Antti Koivisto.
+
+            This change introduces the concept of layers that share backing store for compositing. A layer
+            which is sharing its backing store 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 backing-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-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller.html
+                   compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller.html
+                   compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow.html
+                   compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness.html
+                   compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping.html
+                   compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping.html
+                   compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll.html
+                   compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content.html
+                   compositing/shared-backing/overflow-scroll/scrolled-contents-unconstrained-clip.html
+                   compositing/shared-backing/overflow-scroll/shared-layer-clipping.html
+                   compositing/shared-backing/overflow-scroll/shared-layer-composited-bounds.html
+                   compositing/shared-backing/overflow-scroll/shared-layer-nested-relative-stacking.html
+                   compositing/shared-backing/overflow-scroll/shared-layer-repaint.html
+                   compositing/shared-backing/partial-compositing-update.html
+                   compositing/shared-backing/partial-compositing-update2.html
+                   compositing/shared-backing/remove-sharing-layer.html
+                   compositing/shared-backing/sharing-cached-clip-rects.html
+
+            * rendering/RenderLayer.cpp:
+            (WebCore::RenderLayer::~RenderLayer):
+            (WebCore::RenderLayer::ancestorLayerIsInContainingBlockChain const):
+            (WebCore::RenderLayer::setBackingProviderLayer):
+            (WebCore::RenderLayer::disconnectFromBackingProviderLayer):
+            (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
+            (WebCore::RenderLayer::clippingRootForPainting const):
+            (WebCore::RenderLayer::clipToRect):
+            (WebCore::RenderLayer::paintLayer):
+            (WebCore::RenderLayer::updateClipRects):
+            (WebCore::RenderLayer::clipCrossesPaintingBoundary const):
+            (WebCore::RenderLayer::calculateClipRects const):
+            (WebCore::outputPaintOrderTreeLegend):
+            (WebCore::outputPaintOrderTreeRecursive):
+            (WebCore::inContainingBlockChain): Deleted.
+            * rendering/RenderLayer.h:
+            * rendering/RenderLayerBacking.cpp:
+            (WebCore::RenderLayerBacking::willBeDestroyed):
+            (WebCore::clearBackingSharingLayerProviders):
+            (WebCore::RenderLayerBacking::setBackingSharingLayers):
+            (WebCore::RenderLayerBacking::removeBackingSharingLayer):
+            (WebCore::RenderLayerBacking::clearBackingSharingLayers):
+            (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::stateForPaintOrderChildren const):
+            (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren):
+            (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree):
+            (WebCore::RenderLayerCompositor::BackingSharingState::resetBackingProviderCandidate):
+            (WebCore::RenderLayerCompositor::updateCompositingLayers):
+            (WebCore::backingProviderLayerCanIncludeLayer):
+            (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+            (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
+            (WebCore::RenderLayerCompositor::updateBacking):
+            (WebCore::RenderLayerCompositor::layerWillBeRemoved):
+            (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
+            * rendering/RenderLayerCompositor.h:
+            * rendering/RenderTreeAsText.cpp:
+
+2019-05-15  Kocsen Chung  <kocsen_chung@apple.com>
+
</ins><span class="cx">         Cherry-pick r245368. rdar://problem/49833954
</span><span class="cx"> 
</span><span class="cx">     REGRESSION (r245072): Missing code in Document::styleColorOptions to propagate StyleColor::Options::UseInactiveAppearance
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.cpp (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.cpp 2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.cpp    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -366,6 +366,12 @@
</span><span class="cx"> 
</span><span class="cx">     clearLayerFilters();
</span><span class="cx"> 
</span><ins>+    if (paintsIntoProvidedBacking()) {
+        auto* backingProviderLayer = this->backingProviderLayer();
+        if (backingProviderLayer->backing())
+            backingProviderLayer->backing()->removeBackingSharingLayer(*this);
+    }
+
</ins><span class="cx">     // Child layers will be deleted by their corresponding render objects, so
</span><span class="cx">     // we don't need to delete them ourselves.
</span><span class="cx"> 
</span><span class="lines">@@ -1663,6 +1669,23 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+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;
+}
+
</ins><span class="cx"> RenderLayer* RenderLayer::enclosingAncestorForPosition(PositionType position) const
</span><span class="cx"> {
</span><span class="cx">     RenderLayer* curr = parent();
</span><span class="lines">@@ -1746,6 +1769,27 @@
</span><span class="cx">     return !isComposited() || backing()->paintsIntoCompositedAncestor();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderLayer::setBackingProviderLayer(RenderLayer* backingProvider)
+{
+    if (backingProvider == m_backingProviderLayer)
+        return;
+
+    if (!renderer().renderTreeBeingDestroyed())
+        clearClipRectsIncludingDescendants();
+
+    m_backingProviderLayer = makeWeakPtr(backingProvider);
+}
+
+void RenderLayer::disconnectFromBackingProviderLayer()
+{
+    if (!m_backingProviderLayer)
+        return;
+    
+    ASSERT(m_backingProviderLayer->isComposited());
+    if (m_backingProviderLayer->isComposited())
+        m_backingProviderLayer->backing()->removeBackingSharingLayer(*this);
+}
+
</ins><span class="cx"> bool compositedWithOwnBackingStore(const RenderLayer& layer)
</span><span class="cx"> {
</span><span class="cx">     return layer.isComposited() && !layer.backing()->paintsIntoCompositedAncestor();
</span><span class="lines">@@ -1766,12 +1810,23 @@
</span><span class="cx"> 
</span><span class="cx"> RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(IncludeSelfOrNot includeSelf) const
</span><span class="cx"> {
</span><del>-    if (includeSelf == IncludeSelf && compositedWithOwnBackingStore(*this))
-        return const_cast<RenderLayer*>(this);
</del><ins>+    auto repaintTargetForLayer = [](const RenderLayer& layer) -> RenderLayer* {
+        if (compositedWithOwnBackingStore(layer))
+            return const_cast<RenderLayer*>(&layer);
+        
+        if (layer.paintsIntoProvidedBacking())
+            return layer.backingProviderLayer();
+        
+        return nullptr;
+    };
</ins><span class="cx"> 
</span><ins>+    RenderLayer* repaintTarget = nullptr;
+    if (includeSelf == IncludeSelf && (repaintTarget = repaintTargetForLayer(*this)))
+        return repaintTarget;
+
</ins><span class="cx">     for (const RenderLayer* curr = paintOrderParent(); curr; curr = curr->paintOrderParent()) {
</span><del>-        if (compositedWithOwnBackingStore(*curr))
-            return const_cast<RenderLayer*>(curr);
</del><ins>+        if ((repaintTarget = repaintTargetForLayer(*curr)))
+            return repaintTarget;
</ins><span class="cx">     }
</span><span class="cx">          
</span><span class="cx">     return nullptr;
</span><span class="lines">@@ -1853,6 +1908,9 @@
</span><span class="cx">     if (isComposited())
</span><span class="cx">         return const_cast<RenderLayer*>(this);
</span><span class="cx"> 
</span><ins>+    if (paintsIntoProvidedBacking())
+        return backingProviderLayer();
+
</ins><span class="cx">     const RenderLayer* current = this;
</span><span class="cx">     while (current) {
</span><span class="cx">         if (current->isRenderViewLayer())
</span><span class="lines">@@ -1862,6 +1920,9 @@
</span><span class="cx">         ASSERT(current);
</span><span class="cx">         if (current->transform() || compositedWithOwnBackingStore(*current))
</span><span class="cx">             return const_cast<RenderLayer*>(current);
</span><ins>+
+        if (current->paintsIntoProvidedBacking())
+            return current->backingProviderLayer();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="lines">@@ -3928,18 +3989,6 @@
</span><span class="cx">     m_containsDirtyOverlayScrollbars = false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-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;
-}
-
</del><span class="cx"> void RenderLayer::clipToRect(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, const ClipRect& clipRect, BorderRadiusClippingRule rule)
</span><span class="cx"> {
</span><span class="cx">     float deviceScaleFactor = renderer().document().deviceScaleFactor();
</span><span class="lines">@@ -3958,7 +4007,7 @@
</span><span class="cx">         // any layers with overflow. The condition for being able to apply these clips is that the overflow object be in our
</span><span class="cx">         // containing block chain so we check that also.
</span><span class="cx">         for (RenderLayer* layer = rule == IncludeSelfForBorderRadius ? this : parent(); layer; layer = layer->parent()) {
</span><del>-            if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && inContainingBlockChain(this, layer)) {
</del><ins>+            if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && ancestorLayerIsInContainingBlockChain(*layer)) {
</ins><span class="cx">                 LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer, AdjustForColumns)), layer->size());
</span><span class="cx">                 adjustedClipRect.move(paintingInfo.subpixelOffset);
</span><span class="cx">                 FloatRoundedRect roundedRect = layer->renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor);
</span><span class="lines">@@ -4020,19 +4069,31 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderLayer::paintLayer(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, OptionSet<PaintLayerFlag> paintFlags)
</span><span class="cx"> {
</span><del>-    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().
</del><ins>+    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))
</ins><span class="cx">             return;
</span><del>-        }
-    } else if (viewportConstrainedNotCompositedReason() == NotCompositedForBoundsOutOfView) {
</del><ins>+
+        paintFlags.add(PaintLayerTemporaryClipRects);
+    }
+
+    if (viewportConstrainedNotCompositedReason() == NotCompositedForBoundsOutOfView) {
</ins><span class="cx">         // Don't paint out-of-view viewport constrained layers (when doing prepainting) because they will never be visible
</span><span class="cx">         // unless their position or viewport size is changed.
</span><span class="cx">         ASSERT(renderer().isFixedPositioned());
</span><span class="lines">@@ -5440,7 +5501,7 @@
</span><span class="cx">     // For transformed layers, the root layer was shifted to be us, so there is no need to
</span><span class="cx">     // examine the parent. We want to cache clip rects with us as the root.
</span><span class="cx">     if (auto* parentLayer = (clipRectsContext.rootLayer != this ? parent() : nullptr))
</span><del>-        parentClipRects = parentLayer->updateClipRects(clipRectsContext);
</del><ins>+        parentClipRects = this->parentClipRects(clipRectsContext);
</ins><span class="cx"> 
</span><span class="cx">     auto clipRects = ClipRects::create();
</span><span class="cx">     calculateClipRects(clipRectsContext, clipRects);
</span><span class="lines">@@ -5461,6 +5522,12 @@
</span><span class="cx">     return m_clipRectsCache->getClipRects(context.clipRectsType, context.respectOverflowClip);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool RenderLayer::clipCrossesPaintingBoundary() const
+{
+    return parent()->enclosingPaginationLayer(IncludeCompositedPaginatedLayers) != enclosingPaginationLayer(IncludeCompositedPaginatedLayers)
+        || parent()->enclosingCompositingLayerForRepaint() != enclosingCompositingLayerForRepaint();
+}
+
</ins><span class="cx"> void RenderLayer::calculateClipRects(const ClipRectsContext& clipRectsContext, ClipRects& clipRects) const
</span><span class="cx"> {
</span><span class="cx">     if (!parent()) {
</span><span class="lines">@@ -5483,6 +5550,10 @@
</span><span class="cx">         else {
</span><span class="cx">             ClipRectsContext parentContext(clipRectsContext);
</span><span class="cx">             parentContext.overlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize; // FIXME: why?
</span><ins>+            
+            if (clipCrossesPaintingBoundary())
+                parentContext.clipRectsType = TemporaryClipRects;
+
</ins><span class="cx">             parentLayer->calculateClipRects(parentContext, clipRects);
</span><span class="cx">         }
</span><span class="cx">     } else
</span><span class="lines">@@ -5534,10 +5605,19 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(parent());
</span><span class="cx"> 
</span><del>-    if (clipRectsContext.clipRectsType == TemporaryClipRects) {
</del><ins>+    auto temporaryParentClipRects = [&](const ClipRectsContext& clipContext) {
</ins><span class="cx">         auto parentClipRects = ClipRects::create();
</span><del>-        parent()->calculateClipRects(clipRectsContext, parentClipRects);
</del><ins>+        parent()->calculateClipRects(clipContext, parentClipRects);
</ins><span class="cx">         return parentClipRects;
</span><ins>+    };
+
+    if (clipRectsContext.clipRectsType == TemporaryClipRects)
+        return temporaryParentClipRects(clipRectsContext);
+
+    if (clipCrossesPaintingBoundary()) {
+        ClipRectsContext tempClipRectsContext(clipRectsContext);
+        tempClipRectsContext.clipRectsType = TemporaryClipRects;
+        return temporaryParentClipRects(tempClipRectsContext);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return parent()->updateClipRects(clipRectsContext);
</span><span class="lines">@@ -5557,21 +5637,7 @@
</span><span class="cx"> ClipRect RenderLayer::backgroundClipRect(const ClipRectsContext& clipRectsContext) const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(parent());
</span><del>-    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();
</del><ins>+    auto parentRects = parentClipRects(clipRectsContext);
</ins><span class="cx">     ClipRect backgroundClipRect = backgroundClipRectForPosition(parentRects, renderer().style().position());
</span><span class="cx">     RenderView& view = renderer().view();
</span><span class="cx">     // Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite.
</span><span class="lines">@@ -5944,7 +6010,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     auto computeLayersUnion = [this, &unionBounds, flags, descendantFlags] (const RenderLayer& childLayer) {
</span><del>-        if (!(flags & IncludeCompositedDescendants) && childLayer.isComposited())
</del><ins>+        if (!(flags & IncludeCompositedDescendants) && (childLayer.isComposited() || childLayer.paintsIntoProvidedBacking()))
</ins><span class="cx">             return;
</span><span class="cx">         LayoutRect childBounds = childLayer.calculateLayerBounds(this, childLayer.offsetFromAncestor(this), descendantFlags);
</span><span class="cx">         // Ignore child layer (and behave as if we had overflow: hidden) when it is positioned off the parent layer so much
</span><span class="lines">@@ -6802,7 +6868,7 @@
</span><span class="cx"> static void outputPaintOrderTreeLegend(TextStream& stream)
</span><span class="cx"> {
</span><span class="cx">     stream.nextLine();
</span><del>-    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"
</del><ins>+    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"
</ins><span class="cx">         "Dirty (z)-lists, Dirty (n)ormal flow lists\n"
</span><span class="cx">         "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"
</span><span class="cx">         "Update needs:    post-(l)ayout requirements, (g)eometry, (k)ids geometry, (c)onfig, layer conne(x)ion, (s)crolling tree\n";
</span><span class="lines">@@ -6828,6 +6894,7 @@
</span><span class="cx">     stream << (layer.hasFilter() ? "F" : "-");
</span><span class="cx">     stream << (layer.renderer().isFixedPositioned() ? "X" : "-");
</span><span class="cx">     stream << (layer.isComposited() ? "C" : "-");
</span><ins>+    stream << ((layer.isComposited() && layer.backing()->hasBackingSharingLayers()) ? "P" : (layer.paintsIntoProvidedBacking() ? "p" : "-"));
</ins><span class="cx">     stream << (layer.hasCompositingDescendant() ? "c" : "-");
</span><span class="cx">     stream << (layer.hasCompositedScrollingAncestor() ? "s" : "-");
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.h (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.h   2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayer.h      2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -603,6 +603,8 @@
</span><span class="cx">     // Part of the issue is with subtree relayout: we don't check if our ancestors have some descendant flags dirty, missing some updates.
</span><span class="cx">     bool hasSelfPaintingLayerDescendant() const { return m_hasSelfPaintingLayerDescendant; }
</span><span class="cx"> 
</span><ins>+    bool ancestorLayerIsInContainingBlockChain(const RenderLayer& ancestor, const RenderLayer* checkLimit = nullptr) const;
+
</ins><span class="cx">     // Gets the nearest enclosing positioned ancestor layer (also includes
</span><span class="cx">     // the <html> layer and the root layer).
</span><span class="cx">     RenderLayer* enclosingAncestorForPosition(PositionType) const;
</span><span class="lines">@@ -701,6 +703,8 @@
</span><span class="cx">     LayoutRect selfClipRect() const; // Returns the background clip rect of the layer in the document's coordinate space.
</span><span class="cx">     LayoutRect localClipRect(bool& clipExceedsBounds) const; // Returns the background clip rect of the layer in the local coordinate space.
</span><span class="cx"> 
</span><ins>+    bool clipCrossesPaintingBoundary() const;
+
</ins><span class="cx">     // Pass offsetFromRoot if known.
</span><span class="cx">     bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& damageRect, const RenderLayer* rootLayer, const LayoutSize& offsetFromRoot, const LayoutRect* cachedBoundingBox = nullptr) const;
</span><span class="cx"> 
</span><span class="lines">@@ -813,6 +817,13 @@
</span><span class="cx">     bool hasCompositingDescendant() const { return m_hasCompositingDescendant; }
</span><span class="cx">     bool hasCompositedMask() const;
</span><span class="cx"> 
</span><ins>+    // 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*);
+    void disconnectFromBackingProviderLayer();
+
+    bool paintsIntoProvidedBacking() const { return !!m_backingProviderLayer; }
+
</ins><span class="cx">     RenderLayerBacking* backing() const { return m_backing.get(); }
</span><span class="cx">     RenderLayerBacking* ensureBacking();
</span><span class="cx">     void clearBacking(bool layerBeingDestroyed = false);
</span><span class="lines">@@ -1257,6 +1268,8 @@
</span><span class="cx">     RenderLayer* m_first { nullptr };
</span><span class="cx">     RenderLayer* m_last { nullptr };
</span><span class="cx"> 
</span><ins>+    WeakPtr<RenderLayer> m_backingProviderLayer;
+
</ins><span class="cx">     // For layers that establish stacking contexts, m_posZOrderList holds a sorted list of all the
</span><span class="cx">     // descendant layers within the stacking context that have z-indices of 0 or greater
</span><span class="cx">     // (auto will count as 0). m_negZOrderList holds descendants within our stacking context with negative
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.cpp  2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.cpp     2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -259,6 +259,10 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_owningLayer.backing() == this);
</span><span class="cx">     compositor().removeFromScrollCoordinatedLayers(m_owningLayer);
</span><ins>+
+    LOG(Compositing, "RenderLayer(backing) %p willBeDestroyed", &m_owningLayer);
+
+    clearBackingSharingLayers();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderLayerBacking::willDestroyLayer(const GraphicsLayer* layer)
</span><span class="lines">@@ -267,6 +271,44 @@
</span><span class="cx">         compositor().layerTiledBackingUsageChanged(layer, false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void clearBackingSharingLayerProviders(Vector<WeakPtr<RenderLayer>>& sharingLayers)
+{
+    for (auto& layerWeakPtr : sharingLayers) {
+        if (!layerWeakPtr)
+            continue;
+        layerWeakPtr->setBackingProviderLayer(nullptr);
+    }
+}
+
+void RenderLayerBacking::setBackingSharingLayers(Vector<WeakPtr<RenderLayer>>&& sharingLayers)
+{
+    if (m_backingSharingLayers == sharingLayers) {
+        sharingLayers.clear();
+        return;
+    }
+
+    clearBackingSharingLayerProviders(m_backingSharingLayers);
+    m_backingSharingLayers = WTFMove(sharingLayers);
+    for (auto& layerWeakPtr : m_backingSharingLayers)
+        layerWeakPtr->setBackingProviderLayer(&m_owningLayer);
+}
+
+void RenderLayerBacking::removeBackingSharingLayer(RenderLayer& layer)
+{
+    LOG(Compositing, "RenderLayer %p removeBackingSharingLayer %p", &m_owningLayer, &layer);
+
+    layer.setBackingProviderLayer(nullptr);
+    m_backingSharingLayers.removeAll(&layer);
+}
+
+void RenderLayerBacking::clearBackingSharingLayers()
+{
+    LOG(Compositing, "RenderLayer %p clearBackingSharingLayers", &m_owningLayer);
+
+    clearBackingSharingLayerProviders(m_backingSharingLayers);
+    m_backingSharingLayers.clear();
+}
+
</ins><span class="cx"> Ref<GraphicsLayer> RenderLayerBacking::createGraphicsLayer(const String& name, GraphicsLayer::Type layerType)
</span><span class="cx"> {
</span><span class="cx">     auto* graphicsLayerFactory = renderer().page().chrome().client().graphicsLayerFactory();
</span><span class="lines">@@ -606,7 +648,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool RenderLayerBacking::updateCompositedBounds()
</span><span class="cx"> {
</span><del>-    LayoutRect layerBounds = m_owningLayer.calculateLayerBounds(&m_owningLayer, LayoutSize(), RenderLayer::defaultCalculateLayerBoundsFlags() | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask);
</del><ins>+    LayoutRect layerBounds = m_owningLayer.calculateLayerBounds(&m_owningLayer, { }, RenderLayer::defaultCalculateLayerBoundsFlags() | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask);
</ins><span class="cx">     // Clip to the size of the document or enclosing overflow-scroll layer.
</span><span class="cx">     // If this or an ancestor is transformed, we can't currently compute the correct rect to intersect with.
</span><span class="cx">     // We'd need RenderObject::convertContainerToLocalQuad(), which doesn't yet exist.
</span><span class="lines">@@ -628,7 +670,15 @@
</span><span class="cx"> 
</span><span class="cx">         layerBounds.intersect(clippingBounds);
</span><span class="cx">     }
</span><del>-    
</del><ins>+
+    for (auto& layerWeakPtr : m_backingSharingLayers) {
+        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);
+    }
+
</ins><span class="cx">     // If the element has a transform-origin that has fixed lengths, and the renderer has zero size,
</span><span class="cx">     // then we need to ensure that the compositing layer has non-zero size so that we can apply
</span><span class="cx">     // the transform-origin via the GraphicsLayer anchorPoint (which is expressed as a fractional value).
</span><span class="lines">@@ -1397,7 +1447,7 @@
</span><span class="cx">         bool hasNonScrollingPaintedContent = m_owningLayer.hasVisibleContent() && m_owningLayer.hasVisibleBoxDecorationsOrBackground();
</span><span class="cx">         m_graphicsLayer->setDrawsContent(hasNonScrollingPaintedContent);
</span><span class="cx"> 
</span><del>-        bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || contentsInfo.paintsContent());
</del><ins>+        bool hasScrollingPaintedContent = hasBackingSharingLayers() || (m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || contentsInfo.paintsContent()));
</ins><span class="cx">         m_scrolledContentsLayer->setDrawsContent(hasScrollingPaintedContent);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -2136,6 +2186,9 @@
</span><span class="cx">     if (m_owningLayer.isRenderViewLayer())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    if (hasBackingSharingLayers())
+        return false;
+
</ins><span class="cx">     if (renderer().isRenderReplaced() && (!isCompositedPlugin(renderer()) || isRestartedPlugin(renderer())))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -2606,23 +2659,46 @@
</span><span class="cx">     RenderElement::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(&renderer());
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    FrameView::PaintingState paintingState;
-    if (m_owningLayer.isRenderViewLayer())
-        renderer().view().frameView().willPaintContents(context, paintDirtyRect, paintingState);
</del><ins>+    auto paintOneLayer = [&](RenderLayer& layer, OptionSet<RenderLayer::PaintLayerFlag> paintFlags) {
+        InspectorInstrumentation::willPaint(layer.renderer());
</ins><span class="cx"> 
</span><del>-    RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer);
</del><ins>+        FrameView::PaintingState paintingState;
+        if (layer.isRenderViewLayer())
+            renderer().view().frameView().willPaintContents(context, paintDirtyRect, paintingState);
</ins><span class="cx"> 
</span><del>-    m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags);
</del><ins>+        RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer);
</ins><span class="cx"> 
</span><del>-    if (m_owningLayer.containsDirtyOverlayScrollbars())
-        m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars);
</del><ins>+        layer.paintLayerContents(context, paintingInfo, paintFlags);
</ins><span class="cx"> 
</span><del>-    if (m_owningLayer.isRenderViewLayer())
-        renderer().view().frameView().didPaintContents(context, paintDirtyRect, paintingState);
</del><ins>+        if (layer.containsDirtyOverlayScrollbars())
+            layer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars);
</ins><span class="cx"> 
</span><ins>+        if (layer.isRenderViewLayer())
+            renderer().view().frameView().didPaintContents(context, paintDirtyRect, paintingState);
+
+        ASSERT(!m_owningLayer.m_usedTransparency);
+
+        InspectorInstrumentation::didPaint(layer.renderer(), paintDirtyRect);
+    };
+
+    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)
+            paintOneLayer(*layerWeakPtr, sharingLayerPaintFlags);
+    }
+
</ins><span class="cx">     compositor().didPaintBacking(this);
</span><del>-
-    ASSERT(!m_owningLayer.m_usedTransparency);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Up-call from compositing layer drawing callback.
</span><span class="lines">@@ -2650,7 +2726,6 @@
</span><span class="cx">         || graphicsLayer == m_maskLayer.get()
</span><span class="cx">         || graphicsLayer == m_childClippingMaskLayer.get()
</span><span class="cx">         || graphicsLayer == m_scrolledContentsLayer.get()) {
</span><del>-        InspectorInstrumentation::willPaint(renderer());
</del><span class="cx"> 
</span><span class="cx">         if (!(paintingPhase & GraphicsLayerPaintOverflowContents))
</span><span class="cx">             dirtyRect.intersect(enclosingIntRect(compositedBoundsIncludingMargin()));
</span><span class="lines">@@ -2664,8 +2739,6 @@
</span><span class="cx">             behavior.add(PaintBehavior::TileFirstPaint);
</span><span class="cx"> 
</span><span class="cx">         paintIntoLayer(graphicsLayer, context, dirtyRect, behavior, paintingPhase);
</span><del>-
-        InspectorInstrumentation::didPaint(renderer(), dirtyRect);
</del><span class="cx">     } else if (graphicsLayer == layerForHorizontalScrollbar()) {
</span><span class="cx">         paintScrollbar(m_owningLayer.horizontalScrollbar(), context, dirtyRect);
</span><span class="cx">     } else if (graphicsLayer == layerForVerticalScrollbar()) {
</span><span class="lines">@@ -2672,13 +2745,12 @@
</span><span class="cx">         paintScrollbar(m_owningLayer.verticalScrollbar(), context, dirtyRect);
</span><span class="cx">     } else if (graphicsLayer == layerForScrollCorner()) {
</span><span class="cx">         const LayoutRect& scrollCornerAndResizer = m_owningLayer.scrollCornerAndResizerRect();
</span><del>-        context.save();
</del><ins>+        GraphicsContextStateSaver stateSaver(context);
</ins><span class="cx">         context.translate(-scrollCornerAndResizer.location());
</span><span class="cx">         LayoutRect transformedClip = LayoutRect(clip);
</span><span class="cx">         transformedClip.moveBy(scrollCornerAndResizer.location());
</span><span class="cx">         m_owningLayer.paintScrollCorner(context, IntPoint(), snappedIntRect(transformedClip));
</span><span class="cx">         m_owningLayer.paintResizer(context, IntPoint(), transformedClip);
</span><del>-        context.restore();
</del><span class="cx">     }
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     renderer().page().setIsPainting(false);
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCorerenderingRenderLayerBackingh"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.h (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.h    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.h       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -69,6 +69,15 @@
</span><span class="cx"> 
</span><span class="cx">     RenderLayer& owningLayer() const { return m_owningLayer; }
</span><span class="cx"> 
</span><ins>+    // Included layers are non-z-order descendant layers that are painted into this backing.
+    const Vector<WeakPtr<RenderLayer>>& backingSharingLayers() const { return m_backingSharingLayers; }
+    void setBackingSharingLayers(Vector<WeakPtr<RenderLayer>>&&);
+
+    bool hasBackingSharingLayers() const { return !m_backingSharingLayers.isEmpty(); }
+
+    void removeBackingSharingLayer(RenderLayer&);
+    void clearBackingSharingLayers();
+
</ins><span class="cx">     void updateConfigurationAfterStyleChange();
</span><span class="cx"> 
</span><span class="cx">     // Returns true if layer configuration changed.
</span><span class="lines">@@ -387,6 +396,9 @@
</span><span class="cx"> 
</span><span class="cx">     RenderLayer& m_owningLayer;
</span><span class="cx"> 
</span><ins>+    // A list other layers that paint into this backing store, later than m_owningLayer in paint order.
+    Vector<WeakPtr<RenderLayer>> m_backingSharingLayers;
+
</ins><span class="cx">     RefPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clipped by an ancestor which is not a stacking context.
</span><span class="cx">     RefPtr<GraphicsLayer> m_contentsContainmentLayer; // Only used if we have a background layer; takes the transform.
</span><span class="cx">     RefPtr<GraphicsLayer> m_graphicsLayer;
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp       2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp  2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -232,23 +232,43 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    CompositingState(const CompositingState& other)
-        : compositingAncestor(other.compositingAncestor)
-        , subtreeIsCompositing(other.subtreeIsCompositing)
-        , testingOverlap(other.testingOverlap)
-        , fullPaintOrderTraversalRequired(other.fullPaintOrderTraversalRequired)
-        , descendantsRequireCompositingUpdate(other.descendantsRequireCompositingUpdate)
-        , ancestorHasTransformAnimation(other.ancestorHasTransformAnimation)
</del><ins>+    CompositingState stateForPaintOrderChildren(RenderLayer& layer) const
+    {
+        UNUSED_PARAM(layer);
+        CompositingState childState(compositingAncestor);
+        if (layer.isStackingContext())
+            childState.stackingContextAncestor = &layer;
+        else
+            childState.stackingContextAncestor = stackingContextAncestor;
+
+        childState.subtreeIsCompositing = false;
+        childState.testingOverlap = testingOverlap;
+        childState.fullPaintOrderTraversalRequired = fullPaintOrderTraversalRequired;
+        childState.descendantsRequireCompositingUpdate = descendantsRequireCompositingUpdate;
+        childState.ancestorHasTransformAnimation = ancestorHasTransformAnimation;
</ins><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span><del>-        , hasNotIsolatedCompositedBlendingDescendants(other.hasNotIsolatedCompositedBlendingDescendants)
</del><ins>+        childState.hasNotIsolatedCompositedBlendingDescendants = false; // FIXME: should this only be reset for stacking contexts?
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(TREE_DEBUGGING)
</span><del>-        , depth(other.depth + 1)
</del><ins>+        childState.depth = depth + 1;
</ins><span class="cx"> #endif
</span><ins>+        return childState;
+    }
+
+    void propagateStateFromChildren(const CompositingState& childState)
</ins><span class="cx">     {
</span><ins>+        // Subsequent layers in the parent stacking context also need to composite.
+        subtreeIsCompositing |= childState.subtreeIsCompositing;
+        fullPaintOrderTraversalRequired |= childState.fullPaintOrderTraversalRequired;
</ins><span class="cx">     }
</span><del>-    
</del><ins>+
+    void propagateStateFromChildrenForUnchangedSubtree(const CompositingState& childState)
+    {
+        subtreeIsCompositing |= childState.subtreeIsCompositing;
+    }
+
</ins><span class="cx">     RenderLayer* compositingAncestor;
</span><ins>+    RenderLayer* stackingContextAncestor { nullptr };
</ins><span class="cx">     bool subtreeIsCompositing { false };
</span><span class="cx">     bool testingOverlap { true };
</span><span class="cx">     bool fullPaintOrderTraversalRequired { false };
</span><span class="lines">@@ -262,6 +282,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+struct RenderLayerCompositor::BackingSharingState {
+    RenderLayer* backingProviderCandidate { nullptr };
+    RenderLayer* backingProviderStackingContext { nullptr };
+    Vector<WeakPtr<RenderLayer>> backingSharingLayers;
+
+    void resetBackingProviderCandidate(RenderLayer* candidateLayer = nullptr, RenderLayer* candidateStackingContext = nullptr)
+    {
+        if (!backingSharingLayers.isEmpty()) {
+            ASSERT(backingProviderCandidate);
+            backingProviderCandidate->backing()->setBackingSharingLayers(WTFMove(backingSharingLayers));
+        }
+        backingProviderCandidate = candidateLayer;
+        backingProviderStackingContext = candidateLayer ? candidateStackingContext : nullptr;
+    }
+};
+
</ins><span class="cx"> struct RenderLayerCompositor::OverlapExtent {
</span><span class="cx">     LayoutRect bounds;
</span><span class="cx">     bool extentComputed { false };
</span><span class="lines">@@ -765,10 +801,11 @@
</span><span class="cx">     // FIXME: optimize root-only update.
</span><span class="cx">     if (updateRoot->hasDescendantNeedingCompositingRequirementsTraversal() || updateRoot->needsCompositingRequirementsTraversal()) {
</span><span class="cx">         CompositingState compositingState(updateRoot);
</span><ins>+        BackingSharingState backingSharingState;
</ins><span class="cx">         OverlapMap overlapMap;
</span><span class="cx"> 
</span><span class="cx">         bool descendantHas3DTransform = false;
</span><del>-        computeCompositingRequirements(nullptr, rootRenderLayer(), overlapMap, compositingState, descendantHas3DTransform);
</del><ins>+        computeCompositingRequirements(nullptr, rootRenderLayer(), overlapMap, compositingState, backingSharingState, descendantHas3DTransform);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     LOG(Compositing, "\nRenderLayerCompositor::updateCompositingLayers - mid");
</span><span class="lines">@@ -821,15 +858,23 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap& overlapMap, CompositingState& compositingState, bool& descendantHas3DTransform)
</del><ins>+static bool backingProviderLayerCanIncludeLayer(const RenderLayer& sharedLayer, const RenderLayer& layer)
</ins><span class="cx"> {
</span><del>-    if (!layer.hasDescendantNeedingCompositingRequirementsTraversal() && !layer.needsCompositingRequirementsTraversal() && !compositingState.fullPaintOrderTraversalRequired && !compositingState.descendantsRequireCompositingUpdate) {
-        traverseUnchangedSubtree(ancestorLayer, layer, overlapMap, compositingState, descendantHas3DTransform);
</del><ins>+    return layer.ancestorLayerIsInContainingBlockChain(sharedLayer);
+}
+
+void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap& overlapMap, CompositingState& compositingState, BackingSharingState& backingSharingState, bool& descendantHas3DTransform)
+{
+    if (!layer.hasDescendantNeedingCompositingRequirementsTraversal()
+        && !layer.needsCompositingRequirementsTraversal()
+        && !compositingState.fullPaintOrderTraversalRequired
+        && !compositingState.descendantsRequireCompositingUpdate) {
+        traverseUnchangedSubtree(ancestorLayer, layer, overlapMap, compositingState, backingSharingState, descendantHas3DTransform);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TREE_DEBUGGING)
</span><del>-    LOG(Compositing, "%*p computeCompositingRequirements", 12 + compositingState.depth * 2, &layer);
</del><ins>+    LOG(Compositing, "%*p %s computeCompositingRequirements (backing provider candidate %p)", 12 + compositingState.depth * 2, &layer, layer.isNormalFlowOnly() ? "n" : "s", backingSharingState.backingProviderCandidate);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // FIXME: maybe we can avoid updating all remaining layers in paint order.
</span><span class="lines">@@ -840,6 +885,7 @@
</span><span class="cx">     layer.updateLayerListsIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     layer.setHasCompositingDescendant(false);
</span><ins>+    layer.setBackingProviderLayer(nullptr);
</ins><span class="cx"> 
</span><span class="cx">     // We updated compositing for direct reasons in layerStyleChanged(). Here, check for compositing that can only be evaluated after layout.
</span><span class="cx">     RequiresCompositingData queryData;
</span><span class="lines">@@ -861,12 +907,23 @@
</span><span class="cx">     overlapMap.geometryMap().pushMappingsToAncestor(&layer, ancestorLayer, respectTransforms);
</span><span class="cx"> 
</span><span class="cx">     RenderLayer::IndirectCompositingReason compositingReason = compositingState.subtreeIsCompositing ? RenderLayer::IndirectCompositingReason::Stacking : RenderLayer::IndirectCompositingReason::None;
</span><ins>+    bool layerPaintsIntoProvidedBacking = false;
</ins><span class="cx"> 
</span><span class="cx">     // If we know for sure the layer is going to be composited, don't bother looking it up in the overlap map
</span><span class="cx">     if (!willBeComposited && !overlapMap.isEmpty() && compositingState.testingOverlap) {
</span><span class="cx">         computeExtent(overlapMap, layer, layerExtent);
</span><ins>+
</ins><span class="cx">         // If we're testing for overlap, we only need to composite if we overlap something that is already composited.
</span><del>-        compositingReason = overlapMap.overlapsLayers(layerExtent.bounds) ? RenderLayer::IndirectCompositingReason::Overlap : RenderLayer::IndirectCompositingReason::None;
</del><ins>+        if (overlapMap.overlapsLayers(layerExtent.bounds)) {
+            if (backingSharingState.backingProviderCandidate && backingProviderLayerCanIncludeLayer(*backingSharingState.backingProviderCandidate, layer)) {
+                backingSharingState.backingSharingLayers.append(makeWeakPtr(layer));
+                LOG(Compositing, " layer %p can share with %p", &layer, backingSharingState.backingProviderCandidate);
+                compositingReason = RenderLayer::IndirectCompositingReason::None;
+                layerPaintsIntoProvidedBacking = true;
+            } else
+                compositingReason = RenderLayer::IndirectCompositingReason::Overlap;
+        } else
+            compositingReason = RenderLayer::IndirectCompositingReason::None;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="lines">@@ -888,27 +945,42 @@
</span><span class="cx">     // The children of this layer don't need to composite, unless there is
</span><span class="cx">     // a compositing layer among them, so start by inheriting the compositing
</span><span class="cx">     // ancestor with subtreeIsCompositing set to false.
</span><del>-    CompositingState childState(compositingState);
-    childState.subtreeIsCompositing = false;
-#if ENABLE(CSS_COMPOSITING)
-    childState.hasNotIsolatedCompositedBlendingDescendants = false;
-#endif
</del><ins>+    CompositingState childState = compositingState.stateForPaintOrderChildren(layer);
</ins><span class="cx"> 
</span><del>-    if (willBeComposited) {
-        // Tell the parent it has compositing descendants.
-        compositingState.subtreeIsCompositing = true;
</del><ins>+    auto layerWillComposite = [&](bool postDescendants = false) {
</ins><span class="cx">         // This layer now acts as the ancestor for kids.
</span><span class="cx">         childState.compositingAncestor = &layer;
</span><ins>+        overlapMap.pushCompositingContainer();
+        
+        if (postDescendants) {
+            childState.subtreeIsCompositing = true;
+            addToOverlapMapRecursive(overlapMap, layer);
+        }
</ins><span class="cx"> 
</span><del>-        overlapMap.pushCompositingContainer();
</del><span class="cx">         // This layer is going to be composited, so children can safely ignore the fact that there's an
</span><span class="cx">         // animation running behind this layer, meaning they can rely on the overlap map testing again.
</span><span class="cx">         childState.testingOverlap = true;
</span><ins>+        willBeComposited = true;
</ins><span class="cx"> 
</span><ins>+        layerPaintsIntoProvidedBacking = false;
+        layer.disconnectFromBackingProviderLayer();
+        backingSharingState.backingSharingLayers.removeAll(&layer);
+    };
+
+    if (willBeComposited) {
+        // Tell the parent it has compositing descendants.
+        compositingState.subtreeIsCompositing = true;
+        
+        layerWillComposite();
+
</ins><span class="cx">         computeExtent(overlapMap, layer, layerExtent);
</span><span class="cx">         childState.ancestorHasTransformAnimation |= layerExtent.hasTransformAnimation;
</span><span class="cx">         // Too hard to compute animated bounds if both us and some ancestor is animating transform.
</span><span class="cx">         layerExtent.animationCausesExtentUncertainty |= layerExtent.hasTransformAnimation && compositingState.ancestorHasTransformAnimation;
</span><ins>+
+        // Compositing for any reason disables backing sharing.
+        LOG_WITH_STREAM(Compositing, stream << &layer << " is compositing - flushing sharing to " << backingSharingState.backingProviderCandidate << " with " << backingSharingState.backingSharingLayers.size() << " sharing layers");
+        backingSharingState.resetBackingProviderCandidate();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="lines">@@ -918,7 +990,7 @@
</span><span class="cx">     bool anyDescendantHas3DTransform = false;
</span><span class="cx"> 
</span><span class="cx">     for (auto* childLayer : layer.negativeZOrderLayers()) {
</span><del>-        computeCompositingRequirements(&layer, *childLayer, overlapMap, childState, anyDescendantHas3DTransform);
</del><ins>+        computeCompositingRequirements(&layer, *childLayer, overlapMap, childState, backingSharingState, anyDescendantHas3DTransform);
</ins><span class="cx"> 
</span><span class="cx">         // If we have to make a layer for this child, make one now so we can have a contents layer
</span><span class="cx">         // (since we need to ensure that the -ve z-order child renders underneath our contents).
</span><span class="lines">@@ -925,20 +997,15 @@
</span><span class="cx">         if (!willBeComposited && childState.subtreeIsCompositing) {
</span><span class="cx">             // make layer compositing
</span><span class="cx">             layer.setIndirectCompositingReason(RenderLayer::IndirectCompositingReason::BackgroundLayer);
</span><del>-            childState.compositingAncestor = &layer;
-            overlapMap.pushCompositingContainer();
-            // This layer is going to be composited, so children can safely ignore the fact that there's an
-            // animation running behind this layer, meaning they can rely on the overlap map testing again
-            childState.testingOverlap = true;
-            willBeComposited = true;
</del><ins>+            layerWillComposite();
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     for (auto* childLayer : layer.normalFlowLayers())
</span><del>-        computeCompositingRequirements(&layer, *childLayer, overlapMap, childState, anyDescendantHas3DTransform);
</del><ins>+        computeCompositingRequirements(&layer, *childLayer, overlapMap, childState, backingSharingState, anyDescendantHas3DTransform);
</ins><span class="cx"> 
</span><span class="cx">     for (auto* childLayer : layer.positiveZOrderLayers())
</span><del>-        computeCompositingRequirements(&layer, *childLayer, overlapMap, childState, anyDescendantHas3DTransform);
</del><ins>+        computeCompositingRequirements(&layer, *childLayer, overlapMap, childState, backingSharingState, anyDescendantHas3DTransform);
</ins><span class="cx"> 
</span><span class="cx">     // If we just entered compositing mode, the root will have become composited (as long as accelerated compositing is enabled).
</span><span class="cx">     if (layer.isRenderViewLayer()) {
</span><span class="lines">@@ -967,13 +1034,9 @@
</span><span class="cx">     // Now check for reasons to become composited that depend on the state of descendant layers.
</span><span class="cx">     RenderLayer::IndirectCompositingReason indirectCompositingReason;
</span><span class="cx">     if (!willBeComposited && canBeComposited(layer)
</span><del>-        && requiresCompositingForIndirectReason(layer.renderer(), compositingState.compositingAncestor, childState.subtreeIsCompositing, anyDescendantHas3DTransform, indirectCompositingReason)) {
</del><ins>+        && requiresCompositingForIndirectReason(layer, compositingState.compositingAncestor, childState.subtreeIsCompositing, anyDescendantHas3DTransform, layerPaintsIntoProvidedBacking, indirectCompositingReason)) {
</ins><span class="cx">         layer.setIndirectCompositingReason(indirectCompositingReason);
</span><del>-        childState.compositingAncestor = &layer;
-        childState.subtreeIsCompositing = true;
-        overlapMap.pushCompositingContainer();
-        addToOverlapMapRecursive(overlapMap, layer);
-        willBeComposited = true;
</del><ins>+        layerWillComposite(true);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (layer.reflectionLayer()) {
</span><span class="lines">@@ -993,15 +1056,8 @@
</span><span class="cx">     if ((!childState.testingOverlap && !isCompositedClippingLayer) || layerExtent.knownToBeHaveExtentUncertainty())
</span><span class="cx">         compositingState.testingOverlap = false;
</span><span class="cx">     
</span><del>-    if (isCompositedClippingLayer) {
-        if (!willBeComposited) {
-            childState.compositingAncestor = &layer;
-            childState.subtreeIsCompositing = true;
-            overlapMap.pushCompositingContainer();
-            addToOverlapMapRecursive(overlapMap, layer);
-            willBeComposited = true;
-        }
-    }
</del><ins>+    if (isCompositedClippingLayer & !willBeComposited)
+        layerWillComposite(true);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span><span class="cx">     if ((willBeComposited && layer.hasBlendMode()) || (layer.hasNotIsolatedCompositedBlendingDescendants() && !layer.isolatesCompositedBlending()))
</span><span class="lines">@@ -1023,9 +1079,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Subsequent layers in the parent stacking context also need to composite.
-    compositingState.subtreeIsCompositing |= childState.subtreeIsCompositing;
-    compositingState.fullPaintOrderTraversalRequired |= childState.fullPaintOrderTraversalRequired;
</del><ins>+    compositingState.propagateStateFromChildren(childState);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(willBeComposited == needsToBeComposited(layer, queryData));
</span><span class="cx"> 
</span><span class="lines">@@ -1037,6 +1091,16 @@
</span><span class="cx">         layer.setChildrenNeedCompositingGeometryUpdate();
</span><span class="cx">         // The composited bounds of enclosing layers depends on which descendants are composited, so they need a geometry update.
</span><span class="cx">         layer.setNeedsCompositingGeometryUpdateOnAncestors();
</span><ins>+    } else if (layer.isComposited())
+        layer.backing()->clearBackingSharingLayers();
+
+    if (backingSharingState.backingProviderCandidate && &layer == backingSharingState.backingProviderStackingContext) {
+        LOG_WITH_STREAM(Compositing, stream << &layer << " popping stacking context " << backingSharingState.backingProviderStackingContext << ", flushing candidate " << backingSharingState.backingProviderCandidate << " with " << backingSharingState.backingSharingLayers.size() << " sharing layers");
+        backingSharingState.resetBackingProviderCandidate();
+    } else if (!backingSharingState.backingProviderCandidate && layer.isComposited()) {
+        LOG_WITH_STREAM(Compositing, stream << &layer << " compositing - sharing candidate " << backingSharingState.backingProviderCandidate << " with " << backingSharingState.backingSharingLayers.size() << " sharing layers");
+        // Flush out any earlier candidate in this stacking context. This layer becomes a candidate.
+        backingSharingState.resetBackingProviderCandidate(&layer, compositingState.stackingContextAncestor);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (layer.reflectionLayer() && updateLayerCompositingState(*layer.reflectionLayer(), queryData, CompositingChangeRepaintNow))
</span><span class="lines">@@ -1051,7 +1115,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TREE_DEBUGGING)
</span><del>-    LOG(Compositing, "%*p computeCompositingRequirements - willBeComposited %d", 12 + compositingState.depth * 2, &layer, willBeComposited);
</del><ins>+    LOG(Compositing, "%*p computeCompositingRequirements - willBeComposited %d (backing provider candidate %p)", 12 + compositingState.depth * 2, &layer, willBeComposited, backingSharingState.backingProviderCandidate);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     layer.clearCompositingRequirementsTraversalState();
</span><span class="lines">@@ -1060,7 +1124,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // We have to traverse unchanged layers to fill in the overlap map.
</span><del>-void RenderLayerCompositor::traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap& overlapMap, CompositingState& compositingState, bool& descendantHas3DTransform)
</del><ins>+void RenderLayerCompositor::traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap& overlapMap, CompositingState& compositingState, BackingSharingState& backingSharingState, bool& descendantHas3DTransform)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!compositingState.fullPaintOrderTraversalRequired);
</span><span class="cx">     ASSERT(!layer.hasDescendantNeedingCompositingRequirementsTraversal());
</span><span class="lines">@@ -1086,12 +1150,14 @@
</span><span class="cx">     if (!layerIsComposited && !overlapMap.isEmpty() && compositingState.testingOverlap)
</span><span class="cx">         computeExtent(overlapMap, layer, layerExtent);
</span><span class="cx"> 
</span><del>-    CompositingState childState(compositingState);
-    childState.subtreeIsCompositing = false;
-#if ENABLE(CSS_COMPOSITING)
-    childState.hasNotIsolatedCompositedBlendingDescendants = false;
-#endif
</del><ins>+    if (layer.paintsIntoProvidedBacking()) {
+        ASSERT(backingSharingState.backingProviderCandidate);
+        ASSERT(backingProviderLayerCanIncludeLayer(*backingSharingState.backingProviderCandidate, layer));
+        backingSharingState.backingSharingLayers.append(makeWeakPtr(layer));
+    }
</ins><span class="cx"> 
</span><ins>+    CompositingState childState = compositingState.stateForPaintOrderChildren(layer);
+
</ins><span class="cx">     if (layerIsComposited) {
</span><span class="cx">         // Tell the parent it has compositing descendants.
</span><span class="cx">         compositingState.subtreeIsCompositing = true;
</span><span class="lines">@@ -1107,6 +1173,10 @@
</span><span class="cx">         childState.ancestorHasTransformAnimation |= layerExtent.hasTransformAnimation;
</span><span class="cx">         // Too hard to compute animated bounds if both us and some ancestor is animating transform.
</span><span class="cx">         layerExtent.animationCausesExtentUncertainty |= layerExtent.hasTransformAnimation && compositingState.ancestorHasTransformAnimation;
</span><ins>+
+        // Compositing for any reason disables backing sharing.
+        LOG_WITH_STREAM(Compositing, stream << "tus: " << &layer << " is compositing - flushing sharing to " << backingSharingState.backingProviderCandidate << " with " << backingSharingState.backingSharingLayers.size() << " sharing layers");
+        backingSharingState.resetBackingProviderCandidate();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="lines">@@ -1116,16 +1186,16 @@
</span><span class="cx">     bool anyDescendantHas3DTransform = false;
</span><span class="cx"> 
</span><span class="cx">     for (auto* childLayer : layer.negativeZOrderLayers()) {
</span><del>-        traverseUnchangedSubtree(&layer, *childLayer, overlapMap, childState, anyDescendantHas3DTransform);
</del><ins>+        traverseUnchangedSubtree(&layer, *childLayer, overlapMap, childState, backingSharingState, anyDescendantHas3DTransform);
</ins><span class="cx">         if (childState.subtreeIsCompositing)
</span><span class="cx">             ASSERT(layerIsComposited);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     for (auto* childLayer : layer.normalFlowLayers())
</span><del>-        traverseUnchangedSubtree(&layer, *childLayer, overlapMap, childState, anyDescendantHas3DTransform);
</del><ins>+        traverseUnchangedSubtree(&layer, *childLayer, overlapMap, childState, backingSharingState, anyDescendantHas3DTransform);
</ins><span class="cx"> 
</span><span class="cx">     for (auto* childLayer : layer.positiveZOrderLayers())
</span><del>-        traverseUnchangedSubtree(&layer, *childLayer, overlapMap, childState, anyDescendantHas3DTransform);
</del><ins>+        traverseUnchangedSubtree(&layer, *childLayer, overlapMap, childState, backingSharingState, anyDescendantHas3DTransform);
</ins><span class="cx"> 
</span><span class="cx">     // All layers (even ones that aren't being composited) need to get added to
</span><span class="cx">     // the overlap map. Layers that do not composite will draw into their
</span><span class="lines">@@ -1135,9 +1205,7 @@
</span><span class="cx">     if (childState.compositingAncestor && !childState.compositingAncestor->isRenderViewLayer())
</span><span class="cx">         addToOverlapMap(overlapMap, layer, layerExtent);
</span><span class="cx"> 
</span><del>-    // Subsequent layers in the parent stacking context also need to composite.
-    if (childState.subtreeIsCompositing)
-        compositingState.subtreeIsCompositing = true;
</del><ins>+    compositingState.propagateStateFromChildrenForUnchangedSubtree(childState);
</ins><span class="cx"> 
</span><span class="cx">     // Set the flag to say that this layer has compositing children.
</span><span class="cx">     ASSERT(layer.hasCompositingDescendant() == childState.subtreeIsCompositing);
</span><span class="lines">@@ -1163,6 +1231,18 @@
</span><span class="cx">     if (childState.compositingAncestor == &layer && !layer.isRenderViewLayer())
</span><span class="cx">         overlapMap.popCompositingContainer();
</span><span class="cx"> 
</span><ins>+    if (layer.isComposited())
+        layer.backing()->clearBackingSharingLayers();
+
+    if (backingSharingState.backingProviderCandidate && &layer == backingSharingState.backingProviderStackingContext) {
+        LOG_WITH_STREAM(Compositing, stream << &layer << " tus: popping stacking context " << backingSharingState.backingProviderStackingContext << ", flushing candidate " << backingSharingState.backingProviderCandidate << " with " << backingSharingState.backingSharingLayers.size() << " sharing layers");
+        backingSharingState.resetBackingProviderCandidate();
+    } else if (!backingSharingState.backingProviderCandidate && layer.isComposited()) {
+        LOG_WITH_STREAM(Compositing, stream << &layer << " tus: compositing - sharing candidate " << backingSharingState.backingProviderCandidate << " with " << backingSharingState.backingSharingLayers.size() << " sharing layers");
+        // Flush out any earlier candidate in this stacking context. This layer becomes a candidate.
+        backingSharingState.resetBackingProviderCandidate(&layer, compositingState.stackingContextAncestor);
+    }
+
</ins><span class="cx">     descendantHas3DTransform |= anyDescendantHas3DTransform || layer.has3DTransform();
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!layer.needsCompositingRequirementsTraversal());
</span><span class="lines">@@ -1581,6 +1661,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (backingRequired == BackingRequired::Yes) {
</span><ins>+        layer.disconnectFromBackingProviderLayer();
+
</ins><span class="cx">         enableCompositingMode();
</span><span class="cx">         
</span><span class="cx">         if (!layer.backing()) {
</span><span class="lines">@@ -1733,10 +1815,18 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderLayerCompositor::layerWillBeRemoved(RenderLayer& parent, RenderLayer& child)
</span><span class="cx"> {
</span><del>-    if (!child.isComposited() || parent.renderer().renderTreeBeingDestroyed())
</del><ins>+    if (parent.renderer().renderTreeBeingDestroyed())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    repaintInCompositedAncestor(child, child.backing()->compositedBounds()); // FIXME: do via dirty bits?
</del><ins>+    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;
</ins><span class="cx"> 
</span><span class="cx">     child.setNeedsCompositingLayerConnection();
</span><span class="cx"> }
</span><span class="lines">@@ -2799,12 +2889,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: why doesn't this handle the clipping cases?
</span><del>-bool RenderLayerCompositor::requiresCompositingForIndirectReason(RenderLayerModelObject& renderer, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason& reason) const
</del><ins>+bool RenderLayerCompositor::requiresCompositingForIndirectReason(const RenderLayer& layer, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, bool paintsIntoProvidedBacking, RenderLayer::IndirectCompositingReason& reason) const
</ins><span class="cx"> {
</span><del>-    auto& layer = *renderer.layer();
-
</del><span class="cx">     // When a layer has composited descendants, some effects, like 2d transforms, filters, masks etc must be implemented
</span><span class="cx">     // via compositing so that they also apply to those composited descendants.
</span><ins>+    auto& renderer = layer.renderer();
</ins><span class="cx">     if (hasCompositedDescendants && (layer.isolatesCompositedBlending() || layer.transform() || renderer.createsGroup() || renderer.hasReflection())) {
</span><span class="cx">         reason = RenderLayer::IndirectCompositingReason::GraphicalEffect;
</span><span class="cx">         return true;
</span><span class="lines">@@ -2824,7 +2913,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (renderer.isAbsolutelyPositioned() && compositingAncestor && layer.hasCompositedScrollingAncestor()) {
</del><ins>+    if (!paintsIntoProvidedBacking && renderer.isAbsolutelyPositioned() && compositingAncestor && layer.hasCompositedScrollingAncestor()) {
</ins><span class="cx">         if (layerContainingBlockCrossesCoordinatedScrollingBoundary(layer, *compositingAncestor)) {
</span><span class="cx">             reason = RenderLayer::IndirectCompositingReason::OverflowScrollPositioning;
</span><span class="cx">             return true;
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCorerenderingRenderLayerCompositorh"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.h (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.h 2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerCompositor.h    2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -369,6 +369,7 @@
</span><span class="cx"> private:
</span><span class="cx">     class OverlapMap;
</span><span class="cx">     struct CompositingState;
</span><ins>+    struct BackingSharingState;
</ins><span class="cx">     struct OverlapExtent;
</span><span class="cx"> 
</span><span class="cx">     // Returns true if the policy changed.
</span><span class="lines">@@ -410,8 +411,8 @@
</span><span class="cx"> 
</span><span class="cx">     void updateCompositingLayersTimerFired();
</span><span class="cx"> 
</span><del>-    void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer&, OverlapMap&, CompositingState&, bool& descendantHas3DTransform);
-    void traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer&, OverlapMap&, CompositingState&, bool& descendantHas3DTransform);
</del><ins>+    void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer&, OverlapMap&, CompositingState&, BackingSharingState&, bool& descendantHas3DTransform);
+    void traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer&, OverlapMap&, CompositingState&, BackingSharingState&, bool& descendantHas3DTransform);
</ins><span class="cx"> 
</span><span class="cx">     enum class UpdateLevel {
</span><span class="cx">         AllDescendants          = 1 << 0,
</span><span class="lines">@@ -476,7 +477,7 @@
</span><span class="cx">     bool requiresCompositingForPosition(RenderLayerModelObject&, const RenderLayer&, RequiresCompositingData&) const;
</span><span class="cx">     bool requiresCompositingForOverflowScrolling(const RenderLayer&, RequiresCompositingData&) const;
</span><span class="cx">     bool requiresCompositingForEditableImage(RenderLayerModelObject&) const;
</span><del>-    bool requiresCompositingForIndirectReason(RenderLayerModelObject&, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason&) const;
</del><ins>+    bool requiresCompositingForIndirectReason(const RenderLayer&, const RenderLayer* compositingAncestor, bool hasCompositedDescendants, bool has3DTransformedDescendants, bool paintsIntoProvidedBacking, RenderLayer::IndirectCompositingReason&) const;
</ins><span class="cx"> 
</span><span class="cx">     static bool layerContainingBlockCrossesCoordinatedScrollingBoundary(const RenderLayer&, const RenderLayer& compositedAncestor);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebCorerenderingRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderTreeAsText.cpp (245386 => 245387)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderTreeAsText.cpp    2019-05-16 05:43:36 UTC (rev 245386)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderTreeAsText.cpp       2019-05-16 06:01:45 UTC (rev 245387)
</span><span class="lines">@@ -654,7 +654,8 @@
</span><span class="cx">         if (layer.isComposited()) {
</span><span class="cx">             ts << " (composited, bounds=" << layer.backing()->compositedBounds() << ", drawsContent=" << layer.backing()->graphicsLayer()->drawsContent()
</span><span class="cx">                 << ", paints into ancestor=" << layer.backing()->paintsIntoCompositedAncestor() << ")";
</span><del>-        }
</del><ins>+        } else if (layer.paintsIntoProvidedBacking())
+            ts << " (shared backing of " << layer.backingProviderLayer() << ")";
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span></span></pre>
</div>
</div>

</body>
</html>