forked from SerenityOS/serenity
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Ignore mousewheel events in ViewportPaintable
That allow EventHandler process wheel event on corresponding navigable. For top-level navigable that means IPC call to let chrome know about scrollbar position update. Fixes SerenityOS#23599 Fixes SerenityOS#23493 Fixes SerenityOS#23966
- Loading branch information
1 parent
8a281ab
commit 02512f1
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
new scrollY: 100 |
54 changes: 54 additions & 0 deletions
54
Tests/LibWeb/Text/input/scroll-window-using-wheel-event.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,54 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
body { | ||
overflow: scroll; | ||
} | ||
|
||
.box { | ||
height: 300px; | ||
width: 200px; | ||
} | ||
|
||
.red { | ||
background-color: red; | ||
} | ||
|
||
.green { | ||
background-color: green; | ||
} | ||
|
||
.cyan { | ||
background-color: cyan; | ||
} | ||
|
||
.pink { | ||
background-color: pink; | ||
} | ||
|
||
.blue { | ||
background-color: blue; | ||
} | ||
</style> | ||
<div class="container"> | ||
<div class="box red"></div> | ||
<div class="box green"></div> | ||
<div class="box blue"></div> | ||
<div class="box pink"></div> | ||
<div class="box cyan"></div> | ||
<div class="box red"></div> | ||
<div class="box green"></div> | ||
<div class="box blue"></div> | ||
<div class="box pink"></div> | ||
<div class="box cyan"></div> | ||
</div> | ||
<script src="include.js"></script> | ||
<script> | ||
asyncTest(done => { | ||
const container = document.querySelector(".container"); | ||
window.onscroll = () => { | ||
println(`new scrollY: ${window.scrollY}`); | ||
done(); | ||
}; | ||
internals.wheel(50, 50, 0, 100); | ||
}); | ||
</script> |
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
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