Title: [243125] trunk
Revision
243125
Author
[email protected]
Date
2019-03-18 18:58:05 -0700 (Mon, 18 Mar 2019)

Log Message

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

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (243124 => 243125)


--- trunk/LayoutTests/ChangeLog	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/ChangeLog	2019-03-19 01:58:05 UTC (rev 243125)
@@ -1,3 +1,20 @@
+2019-03-18  Commit Queue  <[email protected]>
+
+        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  <[email protected]>
 
         Smart Insert for paragraphs.

Modified: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt	2019-03-19 01:58:05 UTC (rev 243125)
@@ -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: 
 

Modified: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2.html (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2.html	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2.html	2019-03-19 01:58:05 UTC (rev 243125)
@@ -33,14 +33,6 @@
     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 @@
 }
 </style>
 <script src=""
-<script src=""
+<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 @@
     <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 @@
     <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 @@
     <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,8 @@
     <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>
 
@@ -99,6 +171,15 @@
     <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 class="case">
+    <div class="overflowscroll target">
+        <div class="scrollcontent"></div>
+    </div>
     <div class="overlapping" style="top:40px; left:40px; border-radius:50px; line-height:100px">
     </div>
 </div>

Deleted: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3-expected.txt (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3-expected.txt	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3-expected.txt	2019-03-19 01:58:05 UTC (rev 243125)
@@ -1,5 +0,0 @@
-Test that scrollable areas with text overlap are correctly targeted.
-
-case 1: Scrollable 1 
-case 2: Scrollable 2 
-

Deleted: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3.html (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3.html	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-3.html	2019-03-19 01:58:05 UTC (rev 243125)
@@ -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=""
-<script src=""
-</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>

Deleted: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4-expected.txt (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4-expected.txt	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4-expected.txt	2019-03-19 01:58:05 UTC (rev 243125)
@@ -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 
-

Deleted: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4.html (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4.html	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-4.html	2019-03-19 01:58:05 UTC (rev 243125)
@@ -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=""
-<script src=""
-</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>

Modified: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap.html (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap.html	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap.html	2019-03-19 01:58:05 UTC (rev 243125)
@@ -49,7 +49,85 @@
 }
 </style>
 <script src=""
-<script src=""
+<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>

Deleted: trunk/LayoutTests/fast/scrolling/resources/overflow-scroll-overlap.js (243124 => 243125)


--- trunk/LayoutTests/fast/scrolling/resources/overflow-scroll-overlap.js	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/LayoutTests/fast/scrolling/resources/overflow-scroll-overlap.js	2019-03-19 01:58:05 UTC (rev 243125)
@@ -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();
-}

Modified: trunk/Source/WebCore/ChangeLog (243124 => 243125)


--- trunk/Source/WebCore/ChangeLog	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebCore/ChangeLog	2019-03-19 01:58:05 UTC (rev 243125)
@@ -1,3 +1,20 @@
+2019-03-18  Commit Queue  <[email protected]>
+
+        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  <[email protected]>
 
         Smart Insert for paragraphs.

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (243124 => 243125)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h	2019-03-19 01:58:05 UTC (rev 243125)
@@ -453,6 +453,7 @@
     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&&);
 

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (243124 => 243125)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2019-03-19 01:58:05 UTC (rev 243125)
@@ -1243,7 +1243,7 @@
     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.

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (243124 => 243125)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-03-19 01:58:05 UTC (rev 243125)
@@ -4243,7 +4243,6 @@
     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
@@ -4250,10 +4249,10 @@
     // 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 @@
             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 @@
             }
         }
 
-        if (isCollectingEventRegion)
-            collectEventRegionForFragments(layerFragments, currentContext, localPaintingInfo);
-
         if (shouldPaintOutline)
             paintOutlineForFragments(layerFragments, currentContext, localPaintingInfo, paintBehavior, subtreePaintRootForRenderer);
 
@@ -4468,9 +4464,6 @@
     if (!hasSelfPaintingLayerDescendant())
         return;
 
-    if (paintFlags.contains(PaintLayerCollectingEventRegion) && renderBox() && !renderBox()->hasRenderOverflow())
-        return;
-
 #if !ASSERT_DISABLED
     LayerListMutationDetector mutationChecker(*this);
 #endif
@@ -4753,6 +4746,8 @@
         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 @@
         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::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);

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (243124 => 243125)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2019-03-19 01:58:05 UTC (rev 243125)
@@ -641,9 +641,8 @@
         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 @@
     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);

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (243124 => 243125)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-03-19 01:58:05 UTC (rev 243125)
@@ -765,8 +765,6 @@
     if (!m_owningLayer.isRenderViewLayer()) {
         bool didUpdateContentsRect = false;
         updateDirectlyCompositedBoxDecorations(contentsInfo, didUpdateContentsRect);
-
-        updateEventRegion();
     } else
         updateRootLayerConfiguration();
     
@@ -1433,24 +1431,6 @@
         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 @@
 
     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);
 

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (243124 => 243125)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.h	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h	2019-03-19 01:58:05 UTC (rev 243125)
@@ -352,7 +352,6 @@
     bool paintsContent(RenderLayer::PaintedContentRequest&) const;
 
     void updateDrawsContent(PaintedContentsInfo&);
-    void updateEventRegion();
 
     // Returns true if this compositing layer has no visible content.
     bool isSimpleContainerCompositingLayer(PaintedContentsInfo&) const;

Modified: trunk/Source/WebKit/ChangeLog (243124 => 243125)


--- trunk/Source/WebKit/ChangeLog	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebKit/ChangeLog	2019-03-19 01:58:05 UTC (rev 243125)
@@ -1,3 +1,20 @@
+2019-03-18  Commit Queue  <[email protected]>
+
+        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  <[email protected]>
 
         WKWebView.GetContentsShouldReturnAttributedString is crashing on iOS Simulator.

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm (243124 => 243125)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm	2019-03-19 01:58:05 UTC (rev 243125)
@@ -72,9 +72,11 @@
     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);

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h (243124 => 243125)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h	2019-03-19 01:58:05 UTC (rev 243125)
@@ -40,6 +40,9 @@
 @interface WKCompositingView : UIView
 @end
 
+@interface WKTiledBackingView : WKCompositingView
+@end
+
 @interface WKTransformView : WKCompositingView
 @end
 

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm (243124 => 243125)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-03-19 01:56:39 UTC (rev 243124)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-03-19 01:58:05 UTC (rev 243125)
@@ -49,6 +49,8 @@
         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 @@
 
 @end
 
+@implementation WKTiledBackingView
+@end
+
 @implementation WKTransformView
 
 + (Class)layerClass
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to