Unreviewed, rolling out r243092 and r243096.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 01:58:05 +0000 (01:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 01:58:05 +0000 (01:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195926

Caused assertions in tests (Requested by smfr on #webkit).

Reverted changesets:

"Layer with no backing store should still hit-test over a
scroller"
https://bugs.webkit.org/show_bug.cgi?id=195378
https://trac.webkit.org/changeset/243092

"Try to fix Windows build."
https://trac.webkit.org/changeset/243096

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243125 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt
LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2.html
LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3-expected.txt [deleted file]
LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3.html [deleted file]
LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4-expected.txt [deleted file]
LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4.html [deleted file]
LayoutTests/fast/scrolling/ios/overflow-scroll-overlap.html
LayoutTests/fast/scrolling/resources/overflow-scroll-overlap.js [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm

index c95415b..387f460 100644 (file)
@@ -1,3 +1,20 @@
+2019-03-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r243092 and r243096.
+        https://bugs.webkit.org/show_bug.cgi?id=195926
+
+        Caused assertions in tests (Requested by smfr on #webkit).
+
+        Reverted changesets:
+
+        "Layer with no backing store should still hit-test over a
+        scroller"
+        https://bugs.webkit.org/show_bug.cgi?id=195378
+        https://trac.webkit.org/changeset/243092
+
+        "Try to fix Windows build."
+        https://trac.webkit.org/changeset/243096
+
 2019-03-18  Megan Gardner  <megan_gardner@apple.com>
 
         Smart Insert for paragraphs.
index 1d37bce..8f11fe5 100644 (file)
@@ -1,8 +1,9 @@
 Test that scrollable areas with non-trivial overlap are correctly targeted.
 
-case 1: Scrollable 1 
-case 2: 
+case 1: 
+case 2: Scrollable 2 
 case 3: Scrollable 3 
 case 4: Scrollable 4 
-case 5: 
+case 5: Scrollable 5 
+case 6: 
 
index 45140fd..0c90611 100644 (file)
@@ -33,14 +33,6 @@ body {
     height: 100px;
     background: red;
 }
-.overlapping-empty {
-    position:absolute;
-    left: 25px;
-    top: 25px;
-    width: 100px;
-    height: 100px;
-    background: blue;
-}
 .clip {
     position:absolute;
     width: 100px;
@@ -57,7 +49,85 @@ body {
 }
 </style>
 <script src="../../../resources/basic-gestures.js"></script>
-<script src="../resources/overflow-scroll-overlap.js"></script>
+<script type="text/javascript">
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+    internals.settings.setAsyncFrameScrollingEnabled(true);
+    internals.settings.setAsyncOverflowScrollingEnabled(true);
+}
+
+function sleep(delay)
+{
+    return new Promise((resolve) => { setTimeout(resolve, delay); });
+}
+
+async function runTest() {
+    for (const scrollable of document.querySelectorAll('.overflowscroll')) {
+        scrollable.addEventListener('scroll', function(e) {
+            logScroll(e.target);
+        });
+    }
+
+    {
+        let i = 0;
+        for (const scrollcontent of document.querySelectorAll('.scrollcontent'))
+            scrollcontent.innerText = "Scrollable " + ++i;
+    }
+    {
+        let i = 0;
+        for (const overlapping of document.querySelectorAll('.overlapping'))
+            overlapping.insertBefore(document.createTextNode("Overlapping " + ++i), overlapping.firstChild);
+    }
+
+
+    if (!window.testRunner || !testRunner.runUIScript)
+        return;
+
+    for (const testcase of document.querySelectorAll('.case'))
+        testcase.style.display = 'none';
+
+    {
+        let i = 0;
+        for (const testcase of document.querySelectorAll('.case')) {
+            ++i;
+            testcase.style.display = 'inline-block';
+            
+            const target = testcase.querySelector('.target');
+            const rect = target.getBoundingClientRect();
+            const centerX = (rect.left + rect.right) / 2;
+            const centerY = (rect.top + rect.bottom) / 2;
+            await touchAndDragFromPointToPoint(centerX, centerY, centerX, centerY - 30);
+            await liftUpAtPoint(centerX, centerY - 30);
+            await sleep(500);
+
+            testcase.style.display = 'none';
+            outputCase(i);
+        }
+   }
+
+    for (const testcase of document.querySelectorAll('.case'))
+        testcase.style.display = 'none';
+
+    testRunner.notifyDone();
+}
+
+const scrolledElements = new Set();
+
+function logScroll(element) {
+    if (scrolledElements.has(element))
+        return;
+    scrolledElements.add(element);
+}
+
+function outputCase(i) {
+    log.innerText += "case " + i + ": ";
+    for (const scrolled of scrolledElements)
+        log.innerText += scrolled.getElementsByClassName("scrollcontent")[0].innerText + " ";
+    log.innerText += "\n";
+    scrolledElements.clear();
+}
+</script>
 </head>
 <body onload="runTest()">
 <p>
@@ -67,7 +137,8 @@ Test that scrollable areas with non-trivial overlap are correctly targeted.
     <div class="overflowscroll target">
         <div class="scrollcontent"></div>
     </div>
-    <div class="overlapping" style="visibility:hidden">
+    <div class="overlapping" style="left: 80px">
+        <div class="overlapping" style="left: -40px; top: -30px"></div>
     </div>
 </div>
 
@@ -75,7 +146,7 @@ Test that scrollable areas with non-trivial overlap are correctly targeted.
     <div class="overflowscroll target">
         <div class="scrollcontent"></div>
     </div>
-    <div class="overlapping-empty" style="background-color:transparent">
+    <div class="overlapping" style="box-shadow: 0px 0px 32px 32px blue; left: 60px; top: 60px">
     </div>
 </div>
 
@@ -83,7 +154,7 @@ Test that scrollable areas with non-trivial overlap are correctly targeted.
     <div class="overflowscroll target">
         <div class="scrollcontent"></div>
     </div>
-    <div class="overlapping" style="box-shadow: 0px 0px 32px 32px blue; left: 60px; top: 60px">
+    <div class="overlapping" style="pointer-events:none">
     </div>
 </div>
 
@@ -91,7 +162,17 @@ Test that scrollable areas with non-trivial overlap are correctly targeted.
     <div class="overflowscroll target">
         <div class="scrollcontent"></div>
     </div>
-    <div class="overlapping" style="pointer-events:none">
+    <div class="overlapping" style="top:-60px">
+    Text text text text text text text text text text text text text text text text text text text text text text
+    </div>
+</div>
+
+<div class="case">
+    <div class="overflowscroll target">
+        <div class="scrollcontent"></div>
+    </div>
+    <div class="overlapping" style="top:-60px; padding-left:40px">
+    Text text text text text text text text text text text text text text text text text text text text text text
     </div>
 </div>
 
diff --git a/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3-expected.txt b/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3-expected.txt
deleted file mode 100644 (file)
index 0261016..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Test that scrollable areas with text overlap are correctly targeted.
-
-case 1: Scrollable 1 
-case 2: Scrollable 2 
-
diff --git a/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3.html b/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3.html
deleted file mode 100644 (file)
index 15780a9..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<style>
-body {
-    touch-action: none;
-}
-.case {
-    width: 200px;
-    height: 200px;
-    display: inline-block;
-    position: relative;
-}
-.scrollcontent {
-    width: 500px;
-    height: 500px;
-    background: green;
-}
-
-.overflowscroll {
-    overflow: scroll;
-    height: 100px;
-    width: 100px;
-    position: absolute;
-    border: 2px solid black;
-}
-.overlapping {
-    position:absolute;
-    left: 25px;
-    top: 25px;
-    width: 100px;
-    height: 100px;
-    background: red;
-}
-.clip {
-    position:absolute;
-    width: 100px;
-    height: 100px;
-    overflow:hidden;
-}
-.large {
-    width: 3000px;
-    height: 150px;
-}
-#log {
-    position:relative;
-    white-space: pre;
-}
-</style>
-<script src="../../../resources/basic-gestures.js"></script>
-<script src="../resources/overflow-scroll-overlap.js"></script>
-</head>
-<body onload="runTest()">
-<p>
-Test that scrollable areas with text overlap are correctly targeted.
-</p>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="top:-60px">
-    Text text text text text text text text text text text text text text text text text text text text text text
-    </div>
-</div>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="top:-60px; padding-left:40px">
-    Text text text text text text text text text text text text text text text text text text text text text text
-    </div>
-</div>
-
-<div id=log></div>
-
-</body>
-</html>
diff --git a/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4-expected.txt b/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4-expected.txt
deleted file mode 100644 (file)
index b6c4cc1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Test that scrollable areas with overflowing overlap are correctly targeted.
-
-case 1: 
-case 2: 
-case 3: 
-case 4: 
-case 5: 
-case 6: Scrollable 6 
-
diff --git a/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4.html b/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4.html
deleted file mode 100644 (file)
index 4fdfd1b..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<style>
-body {
-    touch-action: none;
-}
-.case {
-    width: 200px;
-    height: 200px;
-    display: inline-block;
-    position: relative;
-}
-.scrollcontent {
-    width: 500px;
-    height: 500px;
-    background: green;
-}
-
-.overflowscroll {
-    overflow: scroll;
-    height: 100px;
-    width: 100px;
-    position: absolute;
-    border: 2px solid black;
-}
-.overlapping {
-    position:absolute;
-    left: 25px;
-    top: 25px;
-    width: 100px;
-    height: 100px;
-    background: red;
-}
-.clip {
-    position:absolute;
-    width: 100px;
-    height: 100px;
-    overflow:hidden;
-}
-.large {
-    width: 3000px;
-    height: 150px;
-}
-#log {
-    position:relative;
-    white-space: pre;
-}
-</style>
-<script src="../../../resources/basic-gestures.js"></script>
-<script src="../resources/overflow-scroll-overlap.js"></script>
-</head>
-<body onload="runTest()">
-<p>
-Test that scrollable areas with overflowing overlap are correctly targeted.
-</p>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="left: 80px">
-        <div class="overlapping" style="left: -40px; top: -30px"></div>
-    </div>
-</div>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="left: 80px; z-index:0">
-        <div class="overlapping" style="left: -40px; top: -30px"></div>
-    </div>
-</div>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="left: 80px; top: 90px; z-index:0">
-        <div class="overlapping" style="left: -40px; top: -120px"></div>
-    </div>
-</div>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="left: 80px; top: 90px; z-index:0">
-        <div class="overlapping" style="left: -40px; top: -120px; z-index:-1"></div>
-    </div>
-</div>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="left: 80px; top: 90px; z-index:0">
-        <div class="overlapping" style="left: -40px; top: -120px; z-index:1"></div>
-    </div>
-</div>
-
-<div class="case">
-    <div class="overflowscroll target">
-        <div class="scrollcontent"></div>
-    </div>
-    <div class="overlapping" style="left: 80px; top: 60px; z-index:0">
-        <div class="overlapping" style="left: -40px; top: -120px"></div>
-    </div>
-</div>
-
-<div id=log></div>
-
-</body>
-</html>
index 67658de..209246e 100644 (file)
@@ -49,7 +49,85 @@ body {
 }
 </style>
 <script src="../../../resources/basic-gestures.js"></script>
-<script src="../resources/overflow-scroll-overlap.js"></script>
+<script type="text/javascript">
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+    internals.settings.setAsyncFrameScrollingEnabled(true);
+    internals.settings.setAsyncOverflowScrollingEnabled(true);
+}
+
+function sleep(delay)
+{
+    return new Promise((resolve) => { setTimeout(resolve, delay); });
+}
+
+async function runTest() {
+    for (const scrollable of document.querySelectorAll('.overflowscroll')) {
+        scrollable.addEventListener('scroll', function(e) {
+            logScroll(e.target);
+        });
+    }
+
+    {
+        let i = 0;
+        for (const scrollcontent of document.querySelectorAll('.scrollcontent'))
+            scrollcontent.innerText = "Scrollable " + ++i;
+    }
+    {
+        let i = 0;
+        for (const overlapping of document.querySelectorAll('.overlapping'))
+            overlapping.innerText = "Overlapping " + ++i;
+    }
+
+
+    if (!window.testRunner || !testRunner.runUIScript)
+        return;
+
+    for (const testcase of document.querySelectorAll('.case'))
+        testcase.style.display = 'none';
+
+    {
+        let i = 0;
+        for (const testcase of document.querySelectorAll('.case')) {
+            ++i;
+            testcase.style.display = 'inline-block';
+            
+            const target = testcase.querySelector('.target');
+            const rect = target.getBoundingClientRect();
+            const centerX = (rect.left + rect.right) / 2;
+            const centerY = (rect.top + rect.bottom) / 2;
+            await touchAndDragFromPointToPoint(centerX, centerY, centerX, centerY - 30);
+            await liftUpAtPoint(centerX, centerY - 30);
+            await sleep(500);
+
+            testcase.style.display = 'none';
+            outputCase(i);
+        }
+   }
+
+    for (const testcase of document.querySelectorAll('.case'))
+        testcase.style.display = 'none';
+
+    testRunner.notifyDone();
+}
+
+const scrolledElements = new Set();
+
+function logScroll(element) {
+    if (scrolledElements.has(element))
+        return;
+    scrolledElements.add(element);
+}
+
+function outputCase(i) {
+    log.innerText += "case " + i + ": ";
+    for (const scrolled of scrolledElements)
+        log.innerText += scrolled.getElementsByClassName("scrollcontent")[0].innerText + " ";
+    log.innerText += "\n";
+    scrolledElements.clear();
+}
+</script>
 </head>
 <body onload="runTest()">
 <p>
diff --git a/LayoutTests/fast/scrolling/resources/overflow-scroll-overlap.js b/LayoutTests/fast/scrolling/resources/overflow-scroll-overlap.js
deleted file mode 100644 (file)
index e9c4c39..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    internals.settings.setAsyncFrameScrollingEnabled(true);
-    internals.settings.setAsyncOverflowScrollingEnabled(true);
-}
-
-function sleep(delay)
-{
-    return new Promise((resolve) => { setTimeout(resolve, delay); });
-}
-
-async function runTest() {
-    for (const scrollable of document.querySelectorAll('.overflowscroll')) {
-        scrollable.addEventListener('scroll', function(e) {
-            logScroll(e.target);
-        });
-    }
-
-    {
-        let i = 0;
-        for (const scrollcontent of document.querySelectorAll('.scrollcontent'))
-            scrollcontent.innerText = "Scrollable " + ++i;
-    }
-    {
-        let i = 0;
-        for (const overlapping of document.querySelectorAll('.overlapping'))
-            overlapping.insertBefore(document.createTextNode("Overlapping " + ++i), overlapping.firstChild);
-    }
-
-
-    if (!window.testRunner || !testRunner.runUIScript)
-        return;
-
-    for (const testcase of document.querySelectorAll('.case'))
-        testcase.style.display = 'none';
-
-    {
-        let i = 0;
-        for (const testcase of document.querySelectorAll('.case')) {
-            ++i;
-            testcase.style.display = 'inline-block';
-
-            const target = testcase.querySelector('.target');
-            const rect = target.getBoundingClientRect();
-            const centerX = (rect.left + rect.right) / 2;
-            const centerY = (rect.top + rect.bottom) / 2;
-            await touchAndDragFromPointToPoint(centerX, centerY, centerX, centerY - 30);
-            await liftUpAtPoint(centerX, centerY - 30);
-            await sleep(500);
-
-            testcase.style.display = 'none';
-            outputCase(i);
-        }
-   }
-
-    for (const testcase of document.querySelectorAll('.case'))
-        testcase.style.display = 'none';
-
-    testRunner.notifyDone();
-}
-
-const scrolledElements = new Set();
-
-function logScroll(element) {
-    if (scrolledElements.has(element))
-        return;
-    scrolledElements.add(element);
-}
-
-function outputCase(i) {
-    log.innerText += "case " + i + ": ";
-    for (const scrolled of scrolledElements)
-        log.innerText += scrolled.getElementsByClassName("scrollcontent")[0].innerText + " ";
-    log.innerText += "\n";
-    scrolledElements.clear();
-}
index 0bb0e8e..c5e607c 100644 (file)
@@ -1,3 +1,20 @@
+2019-03-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r243092 and r243096.
+        https://bugs.webkit.org/show_bug.cgi?id=195926
+
+        Caused assertions in tests (Requested by smfr on #webkit).
+
+        Reverted changesets:
+
+        "Layer with no backing store should still hit-test over a
+        scroller"
+        https://bugs.webkit.org/show_bug.cgi?id=195378
+        https://trac.webkit.org/changeset/243092
+
+        "Try to fix Windows build."
+        https://trac.webkit.org/changeset/243096
+
 2019-03-18  Megan Gardner  <megan_gardner@apple.com>
 
         Smart Insert for paragraphs.
index da9ac33..c84d75f 100644 (file)
@@ -453,6 +453,7 @@ public:
     WindRule shapeLayerWindRule() const;
     virtual void setShapeLayerWindRule(WindRule);
 
+    // Non-null if the event sensitive region of the layer differs from the layer bounds.
     const Region& eventRegion() const { return m_eventRegion; }
     virtual void setEventRegion(Region&&);
 
index b3a7378..aacf9a6 100644 (file)
@@ -1243,7 +1243,7 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
     if (paintPhase == PaintPhase::EventRegion) {
         // FIXME: Handle inlines, lineboxes, SVG too.
         // FIXME: Transforms?
-        if (visibleToHitTesting())
+        if (style().pointerEvents() != PointerEvents::None)
             paintInfo.eventRegion->unite(enclosingIntRect(LayoutRect(paintOffset, size())));
 
         // No need to check descendants if we don't have overflow.
index 778c17a..a7e711a 100644 (file)
@@ -4243,17 +4243,16 @@ void RenderLayer::paintLayerContents(GraphicsContext& context, const LayerPainti
     bool isPaintingCompositedForeground = paintFlags.contains(PaintLayerPaintingCompositingForegroundPhase);
     bool isPaintingCompositedBackground = paintFlags.contains(PaintLayerPaintingCompositingBackgroundPhase);
     bool isPaintingOverflowContents = paintFlags.contains(PaintLayerPaintingOverflowContents);
-    bool isCollectingEventRegion = paintFlags.contains(PaintLayerCollectingEventRegion);
     // Outline always needs to be painted even if we have no visible content. Also,
     // the outline is painted in the background phase during composited scrolling.
     // If it were painted in the foreground phase, it would move with the scrolled
     // content. When not composited scrolling, the outline is painted in the
     // foreground phase. Since scrolled contents are moved by repainting in this
     // case, the outline won't get 'dragged along'.
-    bool shouldPaintOutline = isSelfPaintingLayer && !isPaintingOverlayScrollbars && !isCollectingEventRegion
+    bool shouldPaintOutline = isSelfPaintingLayer && !isPaintingOverlayScrollbars
         && ((isPaintingScrollingContent && isPaintingCompositedBackground)
         || (!isPaintingScrollingContent && isPaintingCompositedForeground));
-    bool shouldPaintContent = m_hasVisibleContent && isSelfPaintingLayer && !isPaintingOverlayScrollbars && !isCollectingEventRegion;
+    bool shouldPaintContent = m_hasVisibleContent && isSelfPaintingLayer && !isPaintingOverlayScrollbars;
 
     if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer().isRenderView() && !renderer().isDocumentElementRenderer())
         return;
@@ -4324,7 +4323,7 @@ void RenderLayer::paintLayerContents(GraphicsContext& context, const LayerPainti
             paintBehavior.add(PaintBehavior::ExcludeSelection);
 
         LayoutRect paintDirtyRect = localPaintingInfo.paintDirtyRect;
-        if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars || isCollectingEventRegion) {
+        if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars) {
             // Collect the fragments. This will compute the clip rectangles and paint offsets for each layer fragment, as well as whether or not the content of each
             // fragment should paint. If the parent's filter dictates full repaint to ensure proper filter effect,
             // use the overflow clip as dirty rect, instead of no clipping. It maintains proper clipping for overflow::scroll.
@@ -4358,9 +4357,6 @@ void RenderLayer::paintLayerContents(GraphicsContext& context, const LayerPainti
             }
         }
 
-        if (isCollectingEventRegion)
-            collectEventRegionForFragments(layerFragments, currentContext, localPaintingInfo);
-
         if (shouldPaintOutline)
             paintOutlineForFragments(layerFragments, currentContext, localPaintingInfo, paintBehavior, subtreePaintRootForRenderer);
 
@@ -4468,9 +4464,6 @@ void RenderLayer::paintList(LayerList layerIterator, GraphicsContext& context, c
     if (!hasSelfPaintingLayerDescendant())
         return;
 
-    if (paintFlags.contains(PaintLayerCollectingEventRegion) && renderBox() && !renderBox()->hasRenderOverflow())
-        return;
-
 #if !ASSERT_DISABLED
     LayerListMutationDetector mutationChecker(*this);
 #endif
@@ -4753,6 +4746,8 @@ void RenderLayer::paintForegroundForFragments(const LayerFragments& layerFragmen
         paintForegroundForFragmentsWithPhase(PaintPhase::Float, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
         paintForegroundForFragmentsWithPhase(PaintPhase::Foreground, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
         paintForegroundForFragmentsWithPhase(PaintPhase::ChildOutlines, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
+        if (localPaintingInfo.eventRegion)
+            paintForegroundForFragmentsWithPhase(PaintPhase::EventRegion, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer);
     }
     
     if (shouldClip)
@@ -4774,6 +4769,8 @@ void RenderLayer::paintForegroundForFragmentsWithPhase(PaintPhase phase, const L
         PaintInfo paintInfo(context, fragment.foregroundRect.rect(), phase, paintBehavior, subtreePaintRootForRenderer, nullptr, nullptr, &localPaintingInfo.rootLayer->renderer(), this, localPaintingInfo.requireSecurityOriginAccessForWidgets);
         if (phase == PaintPhase::Foreground)
             paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequests;
+        if (phase == PaintPhase::EventRegion)
+            paintInfo.eventRegion = localPaintingInfo.eventRegion;
         renderer().paint(paintInfo, toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subpixelOffset));
         
         if (shouldClip)
@@ -4846,17 +4843,6 @@ void RenderLayer::paintOverflowControlsForFragments(const LayerFragments& layerF
     }
 }
 
-void RenderLayer::collectEventRegionForFragments(const LayerFragments& layerFragments, GraphicsContext& context, const LayerPaintingInfo& localPaintingInfo)
-{
-    ASSERT(localPaintingInfo.eventRegion);
-
-    for (const auto& fragment : layerFragments) {
-        PaintInfo paintInfo(context, fragment.foregroundRect.rect(), PaintPhase::EventRegion, { });
-        paintInfo.eventRegion = localPaintingInfo.eventRegion;
-        renderer().paint(paintInfo, toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subpixelOffset));
-    }
-}
-
 bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result)
 {
     return hitTest(request, result.hitTestLocation(), result);
index 24f26f9..839569e 100644 (file)
@@ -641,9 +641,8 @@ public:
         PaintLayerPaintingRootBackgroundOnly            = 1 << 11,
         PaintLayerPaintingSkipRootBackground            = 1 << 12,
         PaintLayerPaintingChildClippingMaskPhase        = 1 << 13,
-        PaintLayerCollectingEventRegion                 = 1 << 14,
     };
-    static constexpr OptionSet<PaintLayerFlag> paintLayerPaintingCompositingAllPhasesFlags() { return { PaintLayerPaintingCompositingBackgroundPhase, PaintLayerPaintingCompositingForegroundPhase }; }
+    static constexpr OptionSet<PaintLayerFlag> paintLayerPaintingCompositingAllPhasesFlags() { return { PaintLayerPaintingCompositingBackgroundPhase,  PaintLayerPaintingCompositingForegroundPhase }; }
 
     enum class SecurityOriginPaintPolicy { AnyOrigin, AccessibleOriginOnly };
 
@@ -985,7 +984,6 @@ private:
     void paintMaskForFragments(const LayerFragments&, GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintBehavior>, RenderObject* paintingRootForRenderer);
     void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintBehavior>, RenderObject* paintingRootForRenderer);
     void paintTransformedLayerIntoFragments(GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintLayerFlag>);
-    void collectEventRegionForFragments(const LayerFragments&, GraphicsContext&, const LayerPaintingInfo&);
 
     RenderLayer* transparentPaintingAncestor();
     void beginTransparencyLayers(GraphicsContext&, const LayerPaintingInfo&, const LayoutRect& dirtyRect);
index 550bc18..35e7367 100644 (file)
@@ -765,8 +765,6 @@ bool RenderLayerBacking::updateConfiguration()
     if (!m_owningLayer.isRenderViewLayer()) {
         bool didUpdateContentsRect = false;
         updateDirectlyCompositedBoxDecorations(contentsInfo, didUpdateContentsRect);
-
-        updateEventRegion();
     } else
         updateRootLayerConfiguration();
     
@@ -1433,24 +1431,6 @@ void RenderLayerBacking::updateDrawsContent(PaintedContentsInfo& contentsInfo)
         m_backgroundLayer->setDrawsContent(m_backgroundLayerPaintsFixedRootBackground ? hasPaintedContent : contentsInfo.paintsBoxDecorations());
 }
 
-void RenderLayerBacking::updateEventRegion()
-{
-#if PLATFORM(COCOA)
-    GraphicsContext nullContext(nullptr);
-    RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, compositedBounds(), { }, LayoutSize());
-
-    Region eventRegion;
-    paintingInfo.eventRegion = &eventRegion;
-
-    auto paintFlags = RenderLayer::paintLayerPaintingCompositingAllPhasesFlags() | RenderLayer::PaintLayerCollectingEventRegion;
-    m_owningLayer.paintLayerContents(nullContext, paintingInfo, paintFlags);
-
-    eventRegion.translate(roundedIntSize(contentOffsetInCompositingLayer()));
-
-    m_graphicsLayer->setEventRegion(WTFMove(eventRegion));
-#endif
-}
-
 // Return true if the layer changed.
 bool RenderLayerBacking::updateAncestorClippingLayer(bool needsAncestorClip)
 {
@@ -2606,8 +2586,19 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap
 
     RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer);
 
+#if PLATFORM(IOS_FAMILY)
+    Region eventRegion;
+    paintingInfo.eventRegion = &eventRegion;
+#endif
+
     m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags);
 
+#if PLATFORM(IOS_FAMILY)
+    paintingInfo.eventRegion = nullptr;
+    eventRegion.translate(roundedIntSize(contentOffsetInCompositingLayer()));
+    m_graphicsLayer->setEventRegion(WTFMove(eventRegion));
+#endif
+
     if (m_owningLayer.containsDirtyOverlayScrollbars())
         m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars);
 
index fbe2a70..01a6bfa 100644 (file)
@@ -352,7 +352,6 @@ private:
     bool paintsContent(RenderLayer::PaintedContentRequest&) const;
 
     void updateDrawsContent(PaintedContentsInfo&);
-    void updateEventRegion();
 
     // Returns true if this compositing layer has no visible content.
     bool isSimpleContainerCompositingLayer(PaintedContentsInfo&) const;
index 52f715e..780688e 100644 (file)
@@ -1,3 +1,20 @@
+2019-03-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r243092 and r243096.
+        https://bugs.webkit.org/show_bug.cgi?id=195926
+
+        Caused assertions in tests (Requested by smfr on #webkit).
+
+        Reverted changesets:
+
+        "Layer with no backing store should still hit-test over a
+        scroller"
+        https://bugs.webkit.org/show_bug.cgi?id=195378
+        https://trac.webkit.org/changeset/243092
+
+        "Try to fix Windows build."
+        https://trac.webkit.org/changeset/243096
+
 2019-03-18  Timothy Hatcher  <timothy@apple.com>
 
         WKWebView.GetContentsShouldReturnAttributedString is crashing on iOS Simulator.
index 629a9c6..305918f 100644 (file)
@@ -72,9 +72,11 @@ std::unique_ptr<RemoteLayerTreeNode> RemoteLayerTreeHost::makeNode(const RemoteL
     case PlatformCALayer::LayerTypeWebLayer:
     case PlatformCALayer::LayerTypeRootLayer:
     case PlatformCALayer::LayerTypeSimpleLayer:
+        return makeAdoptingView([[WKCompositingView alloc] init]);
+        
     case PlatformCALayer::LayerTypeTiledBackingLayer:
     case PlatformCALayer::LayerTypePageTiledBackingLayer:
-        return makeAdoptingView([[WKCompositingView alloc] init]);
+        return makeAdoptingView([[WKTiledBackingView alloc] init]);
 
     case PlatformCALayer::LayerTypeTiledBackingTileLayer:
         return RemoteLayerTreeNode::createWithPlainLayer(properties.layerID);
index 9a58a02..cd47abb 100644 (file)
@@ -40,6 +40,9 @@ class WebPageProxy;
 @interface WKCompositingView : UIView
 @end
 
+@interface WKTiledBackingView : WKCompositingView
+@end
+
 @interface WKTransformView : WKCompositingView
 @end
 
index 28fe543..9a4f34e 100644 (file)
@@ -49,6 +49,8 @@ static void collectDescendantViewsAtPoint(Vector<UIView *, 16>& viewsAtPoint, UI
         auto handlesEvent = [&] {
             if (![view pointInside:subviewPoint withEvent:event])
                 return false;
+            if ([view isKindOfClass:[WKTiledBackingView class]])
+                return true;
             if (![view isKindOfClass:[WKCompositingView class]])
                 return true;
             auto* node = RemoteLayerTreeNode::forCALayer(view.layer);
@@ -113,6 +115,9 @@ static void collectDescendantViewsAtPoint(Vector<UIView *, 16>& viewsAtPoint, UI
 
 @end
 
+@implementation WKTiledBackingView
+@end
+
 @implementation WKTransformView
 
 + (Class)layerClass