-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust the size limit for Interaction Regions
https://bugs.webkit.org/show_bug.cgi?id=260659 <rdar://114216114> Reviewed by Tim Horton. Tweak the maximum size threshold (relative to the frame area) before we skip Interaction Regions. * Source/WebCore/page/InteractionRegion.cpp: (WebCore::interactionRegionForRenderedRegion): Make the maximum 1/3rd instead of half of the frame area. * LayoutTests/interaction-region/interaction-region-size-limit-expected.txt: Added. * LayoutTests/interaction-region/interaction-region-size-limit.html: Added. Add a test with some mockup UI. Canonical link: https://commits.webkit.org/267277@main
- Loading branch information
1 parent
5023d70
commit 05a5d83
Showing
3 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
LayoutTests/interaction-region/interaction-region-size-limit-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(GraphicsLayer | ||
(anchor 0.00 0.00) | ||
(bounds 800.00 600.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(bounds 800.00 600.00) | ||
(contentsOpaque 1) | ||
(drawsContent 1) | ||
(backgroundColor #FFFFFF) | ||
(event region | ||
(rect (0,0) width=800 height=600) | ||
|
||
(interaction regions [ | ||
(interaction (0,0) width=395 height=295) | ||
(borderRadius 0.00), | ||
(interaction (0,305) width=395 height=295) | ||
(borderRadius 0.00)]) | ||
) | ||
) | ||
) | ||
) | ||
|
60 changes: 60 additions & 0 deletions
60
LayoutTests/interaction-region/interaction-region-size-limit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<style> | ||
section { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
|
||
display: flex; | ||
flex-direction: row; | ||
gap: 10px; | ||
|
||
cursor: pointer; | ||
|
||
background: gray; | ||
} | ||
|
||
div { | ||
flex-grow: 1; | ||
|
||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
|
||
background: purple; | ||
} | ||
|
||
div > div { | ||
background: blue; | ||
} | ||
|
||
</style> | ||
<body> | ||
<section> | ||
<div> | ||
<div> | ||
</div> | ||
<div> | ||
</div> | ||
</div> | ||
<div></div> | ||
</section> | ||
<pre id="results"></pre> | ||
<script> | ||
document.body.addEventListener("click", function(e) { | ||
console.log(e, "event delegation"); | ||
}); | ||
|
||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
|
||
window.onload = function () { | ||
if (window.internals) | ||
results.textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION | internals.LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES); | ||
}; | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters