Commit 7df68291 authored by Olga Gerchikov's avatar Olga Gerchikov Committed by Commit Bot

Add virtual tests suite for kWheelEventRegions feature

- Added WheelEventRegions runtime feature flag.
- Changed mouse coordinates in wheel-event-target.html test to
  accommodate for rounding per [1].
- Changed wheel event handler region in layer-scroll-rects-get.js
  to enforce not empty wheel handler region.

[1] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/graphics/paint/paint_controller.cc;l=49;bpv=1;bpt=1?q=RecordHitTestData&ss=chromium%2Fchromium%2Fsrc

Bug: 1136588
Change-Id: I437c87d7c8a53f107f676b647d737ce1de7827f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521354Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Reviewed-by: default avatarSam Fortiner <samfort@microsoft.com>
Commit-Queue: Olga Gerchikov <gerchiko@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#827435}
parent f0a45fa3
...@@ -317,6 +317,7 @@ void SetRuntimeFeaturesFromChromiumFeatures() { ...@@ -317,6 +317,7 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
{wf::EnableParseUrlProtocolHandler, {wf::EnableParseUrlProtocolHandler,
blink::features::kWebAppEnableProtocolHandlers}, blink::features::kWebAppEnableProtocolHandlers},
{wf::EnableWebID, features::kWebID}, {wf::EnableWebID, features::kWebID},
{wf::EnableWheelEventRegions, features::kWheelEventRegions},
}; };
for (const auto& mapping : blinkFeatureToBaseFeatureMapping) { for (const auto& mapping : blinkFeatureToBaseFeatureMapping) {
SetRuntimeFeatureFromChromiumFeature( SetRuntimeFeatureFromChromiumFeature(
......
...@@ -177,6 +177,7 @@ class WebRuntimeFeatures { ...@@ -177,6 +177,7 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableWebXRLightEstimation(bool); BLINK_PLATFORM_EXPORT static void EnableWebXRLightEstimation(bool);
BLINK_PLATFORM_EXPORT static void EnableWebXRPlaneDetection(bool); BLINK_PLATFORM_EXPORT static void EnableWebXRPlaneDetection(bool);
BLINK_PLATFORM_EXPORT static void EnableWebXRViewportScale(bool); BLINK_PLATFORM_EXPORT static void EnableWebXRViewportScale(bool);
BLINK_PLATFORM_EXPORT static void EnableWheelEventRegions(bool);
BLINK_PLATFORM_EXPORT static void ForceOverlayFullscreenVideo(bool); BLINK_PLATFORM_EXPORT static void ForceOverlayFullscreenVideo(bool);
BLINK_PLATFORM_EXPORT static void EnableTimerThrottlingForBackgroundTabs( BLINK_PLATFORM_EXPORT static void EnableTimerThrottlingForBackgroundTabs(
bool); bool);
......
...@@ -413,6 +413,10 @@ void WebRuntimeFeatures::EnableWebXRViewportScale(bool enable) { ...@@ -413,6 +413,10 @@ void WebRuntimeFeatures::EnableWebXRViewportScale(bool enable) {
RuntimeEnabledFeatures::SetWebXRViewportScaleEnabled(enable); RuntimeEnabledFeatures::SetWebXRViewportScaleEnabled(enable);
} }
void WebRuntimeFeatures::EnableWheelEventRegions(bool enable) {
RuntimeEnabledFeatures::SetWheelEventRegionsEnabled(enable);
}
void WebRuntimeFeatures::EnablePresentationAPI(bool enable) { void WebRuntimeFeatures::EnablePresentationAPI(bool enable) {
RuntimeEnabledFeatures::SetPresentationEnabled(enable); RuntimeEnabledFeatures::SetPresentationEnabled(enable);
} }
......
...@@ -2252,6 +2252,9 @@ ...@@ -2252,6 +2252,9 @@
depends_on: ["WebXRARModule"], depends_on: ["WebXRARModule"],
status: "experimental", status: "experimental",
}, },
{
name: "WheelEventRegions",
},
// Extends window placement functionality for multi-screen devices. Also // Extends window placement functionality for multi-screen devices. Also
// exposes requisite information about displays connected to the device. // exposes requisite information about displays connected to the device.
{ {
......
...@@ -768,5 +768,31 @@ ...@@ -768,5 +768,31 @@
"bases": ["fast/scrolling/scrollbars"], "bases": ["fast/scrolling/scrollbars"],
"args": ["--enable-features=ScrollUnification", "args": ["--enable-features=ScrollUnification",
"--enable-threaded-compositing"] "--enable-threaded-compositing"]
},
{
"prefix": "wheel-event-regions",
"bases": ["fast/dom/shadow/wheel-event-in-shadow-dom.html",
"fast/dom/shadow/wheel-event-on-input-in-shadow-dom.html",
"fast/compositor-wheel-scroll-latching",
"fast/events/move-element-with-wheel-and-touch-event-listeners.html",
"fast/events/iframe-mousewheel.html",
"fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html",
"fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html",
"fast/events/platform-wheelevent-paging-x-in-scrolling-page.html",
"fast/events/platform-wheelevent-paging-y-in-scrolling-page.html",
"fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html",
"fast/events/platform-wheelevent-paging-y-in-non-scrolling-div.html",
"fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html",
"fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html",
"fast/events/wheel",
"fast/scrolling/document-level-wheel-event-listener-passive-by-default.html",
"http/tests/devtools/layers/layer-scroll-rects-get.js",
"pointer-lock/wheel-event-cancelable.html",
"pointer-lock/wheel-event-target.html",
"scrollbars/scrollevent-iframe-no-scrolling-wheel.html",
"scrollingcoordinator/donot-compute-non-fast-scrollable-region-for-hidden-frames.html",
"scrollingcoordinator/plugin-with-wheel-handler.html",
"scrollingcoordinator/non-fast-scrollable-region-nested.html"],
"args": ["--enable-features=WheelEventRegions"]
} }
] ]
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
TestRunner.addResult(`Tests scroll rectangles support in in Layers3DViewxScroll rectangles\n`); TestRunner.addResult(`Tests scroll rectangles support in in Layers3DViewxScroll rectangles\n`);
await TestRunner.loadModule('layers_test_runner'); await TestRunner.loadModule('layers_test_runner');
await TestRunner.loadHTML(` await TestRunner.loadHTML(`
<div style="transform: translateZ(100px);" onmousewheel=""></div> <div style="transform: translateZ(100px);height:20px;width:30px;" onmousewheel=""></div>
<div id="touchable" style="transform:translateZ(100px);height:20px;width:20px;overflow:scroll;"> <div id="touchable" style="transform:translateZ(100px);height:20px;width:20px;overflow:scroll;">
<div style="height:40px;width:40px;"></div> <div style="height:40px;width:40px;"></div>
</div> </div>
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
testObject.unreached_func("wheel event should not fire on element with id = text!")); testObject.unreached_func("wheel event should not fire on element with id = text!"));
let rect = textDiv.getBoundingClientRect(); let rect = textDiv.getBoundingClientRect();
let x = rect.left; let x = rect.left + 5;
let y = rect.top; let y = rect.top + 5;
await mouseMoveTo(x, y); await mouseMoveTo(x, y);
await smoothScrollWithXY(5, 5, x, y, GestureSourceType.MOUSE_INPUT, SPEED_INSTANT); await smoothScrollWithXY(5, 5, x, y, GestureSourceType.MOUSE_INPUT, SPEED_INSTANT);
......
This directory is dedicated for testing the "WheelEventRegions" feature.
This directory is dedicated for testing the "WheelEventRegions" feature.
Tests scroll rectangles support in in Layers3DViewxScroll rectangles
Scroll rectangles
{
0 : {
rect : {
height : 20
width : 30
x : 0
y : 0
}
type : "WheelEventHandler"
}
}
{
0 : {
rect : {
height : 20
width : 20
x : 0
y : 0
}
type : "TouchEventHandler"
}
}
{
0 : {
rect : {
height : 40
width : 40
x : 0
y : 0
}
type : "TouchEventHandler"
}
}
...@@ -44804,6 +44804,7 @@ from previous Chrome versions. ...@@ -44804,6 +44804,7 @@ from previous Chrome versions.
<int value="698273842" label="SyncSendTabToSelf:enabled"/> <int value="698273842" label="SyncSendTabToSelf:enabled"/>
<int value="698809951" label="WebRtcHWVP8Encoding:enabled"/> <int value="698809951" label="WebRtcHWVP8Encoding:enabled"/>
<int value="699149897" label="ContentSuggestionsDebugLog:disabled"/> <int value="699149897" label="ContentSuggestionsDebugLog:disabled"/>
<int value="700346797" label="WheelEventRegions:enabled"/>
<int value="701766325" label="PerNavigationMojoInterface:enabled"/> <int value="701766325" label="PerNavigationMojoInterface:enabled"/>
<int value="703469777" label="AndroidNightModeTabReparenting:enabled"/> <int value="703469777" label="AndroidNightModeTabReparenting:enabled"/>
<int value="705407202" label="AutofillSaveCardImprovedUserConsent:disabled"/> <int value="705407202" label="AutofillSaveCardImprovedUserConsent:disabled"/>
...@@ -45066,6 +45067,7 @@ from previous Chrome versions. ...@@ -45066,6 +45067,7 @@ from previous Chrome versions.
<int value="977140835" label="OmniboxMostVisitedTiles:disabled"/> <int value="977140835" label="OmniboxMostVisitedTiles:disabled"/>
<int value="977968353" label="WebUITabStrip:disabled"/> <int value="977968353" label="WebUITabStrip:disabled"/>
<int value="978712907" label="PrintServerUi:disabled"/> <int value="978712907" label="PrintServerUi:disabled"/>
<int value="979397813" label="WheelEventRegions:disabled"/>
<int value="979445973" label="OmniboxSpareRenderer:enabled"/> <int value="979445973" label="OmniboxSpareRenderer:enabled"/>
<int value="980396200" label="enable-new-korean-ime"/> <int value="980396200" label="enable-new-korean-ime"/>
<int value="981818901" label="AppBanners:enabled"/> <int value="981818901" label="AppBanners:enabled"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment