Diff
Modified: trunk/LayoutTests/ChangeLog (270847 => 270848)
--- trunk/LayoutTests/ChangeLog 2020-12-15 17:40:54 UTC (rev 270847)
+++ trunk/LayoutTests/ChangeLog 2020-12-15 17:47:26 UTC (rev 270848)
@@ -1,3 +1,17 @@
+2020-12-15 Zalan Bujtas <[email protected]>
+
+ [LFC][Integration] REGRESSION: Event handler region is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=219515
+ <rdar://problem/71955706>
+
+ Reviewed by Antti Koivisto.
+
+ * fast/scrolling/mac/event-region-is-leaking-out-expected.txt: Added.
+ * fast/scrolling/mac/event-region-is-leaking-out.html: Added.
+ progressions:
+ * tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt:
+ * tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt:
+
2020-12-15 Sihui Liu <[email protected]>
resultIndex of SpeechRecognitionEvent should be the first index that has change
Added: trunk/LayoutTests/fast/scrolling/mac/event-region-is-leaking-out-expected.txt (0 => 270848)
--- trunk/LayoutTests/fast/scrolling/mac/event-region-is-leaking-out-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/event-region-is-leaking-out-expected.txt 2020-12-15 17:47:26 UTC (rev 270848)
@@ -0,0 +1,20 @@
+Wheel Event Handlers here.
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 785.00 2128.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 785.00 2128.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backgroundColor #FFFFFF)
+ (event region
+ (rect (0,0) width=785 height=2128)
+ (wheel event listener region
+ (rect (128,120) width=422 height=442)
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/fast/scrolling/mac/event-region-is-leaking-out.html (0 => 270848)
--- trunk/LayoutTests/fast/scrolling/mac/event-region-is-leaking-out.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/event-region-is-leaking-out.html 2020-12-15 17:47:26 UTC (rev 270848)
@@ -0,0 +1,35 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+<style>
+body {
+ height: 2000px;
+}
+
+.container {
+ width: 400px;
+ height: 420px;
+ padding: 10px;
+ margin: 120px;
+ border: 1px solid black;
+}
+</style>
+<script>
+window._onload_ = function () {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ let container = document.querySelector('.container');
+ container.addEventListener('wheel', () => { }, { passive: true });
+ document.body.offsetLeft;
+
+ if (window.internals)
+ results.innerText += internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION | internals.LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES);
+};
+</script>
+</head>
+<body>
+<div class="container">Wheel Event Handlers here.</div>
+<pre id="results"></pre>
+</body>
+</html>
Modified: trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt (270847 => 270848)
--- trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt 2020-12-15 17:40:54 UTC (rev 270847)
+++ trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt 2020-12-15 17:47:26 UTC (rev 270848)
@@ -19,18 +19,8 @@
(event region
(rect (0,0) width=800 height=600)
(wheel event listener region
- (rect (9,9) width=250 height=9)
- (rect (9,18) width=243 height=18)
- (rect (9,36) width=271 height=18)
- (rect (9,54) width=246 height=18)
- (rect (9,72) width=262 height=1)
(rect (9,73) width=285 height=198)
(non-passive
- (rect (9,9) width=250 height=9)
- (rect (9,18) width=243 height=18)
- (rect (9,36) width=271 height=18)
- (rect (9,54) width=246 height=18)
- (rect (9,72) width=262 height=1)
(rect (9,73) width=285 height=198)
)
)
Modified: trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt (270847 => 270848)
--- trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt 2020-12-15 17:40:54 UTC (rev 270847)
+++ trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt 2020-12-15 17:47:26 UTC (rev 270848)
@@ -19,8 +19,7 @@
(event region
(rect (0,0) width=785 height=672)
(wheel event listener region
- (rect (0,0) width=81 height=18)
- (rect (8,18) width=65 height=8)
+ (rect (8,8) width=65 height=18)
(rect (8,26) width=769 height=108)
(rect (8,134) width=28 height=18)
(rect (300,134) width=226 height=18)
@@ -38,8 +37,7 @@
(rect (209,557) width=81 height=18)
(rect (8,575) width=83 height=27)
(non-passive
- (rect (0,0) width=81 height=18)
- (rect (8,18) width=65 height=8)
+ (rect (8,8) width=65 height=18)
(rect (8,26) width=769 height=108)
(rect (8,134) width=28 height=18)
(rect (300,134) width=226 height=18)
Modified: trunk/Source/WebCore/ChangeLog (270847 => 270848)
--- trunk/Source/WebCore/ChangeLog 2020-12-15 17:40:54 UTC (rev 270847)
+++ trunk/Source/WebCore/ChangeLog 2020-12-15 17:47:26 UTC (rev 270848)
@@ -1,3 +1,18 @@
+2020-12-15 Zalan Bujtas <[email protected]>
+
+ [LFC][Integration] REGRESSION: Event handler region is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=219515
+ <rdar://problem/71955706>
+
+ Reviewed by Antti Koivisto.
+
+ Event regions need to include the paint offset the same way painting does.
+
+ Test: fast/scrolling/mac/event-region-is-leaking-out.html
+
+ * layout/integration/LayoutIntegrationLineLayout.cpp:
+ (WebCore::LayoutIntegration::LineLayout::paint):
+
2020-12-15 Sihui Liu <[email protected]>
resultIndex of SpeechRecognitionEvent should be the first index that has change
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (270847 => 270848)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-12-15 17:40:54 UTC (rev 270847)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-12-15 17:47:26 UTC (rev 270848)
@@ -417,8 +417,10 @@
continue;
if (paintInfo.eventRegionContext) {
- if (style.pointerEvents() != PointerEvents::None)
+ if (style.pointerEvents() != PointerEvents::None) {
+ visualOverflowRect.moveBy(paintOffset);
paintInfo.eventRegionContext->unite(enclosingIntRect(visualOverflowRect), style);
+ }
continue;
}