forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Apply corner clip before scroll offset for PaintableWithLines
Fixes bug when corner clip mask moves along with the scrolled text.
- Loading branch information
1 parent
ed8d036
commit 907a8fe
Showing
3 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
Tests/LibWeb/Ref/reference/scrolled-text-with-clipped-corners-ref.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,37 @@ | ||
<!DOCTYPE html> | ||
<link rel="match" href="reference/scrollable-contains-boxes-with-hidden-overflow-2-ref.html" /> | ||
<style> | ||
* { | ||
scrollbar-width: none; | ||
} | ||
|
||
#container { | ||
width: 300px; | ||
height: 300px; | ||
border: 5px solid black; | ||
border-radius: 50%; | ||
overflow: hidden; | ||
} | ||
|
||
#text-container { | ||
overflow: scroll; | ||
width: 300px; | ||
height: 300px; | ||
font-size: 40px; | ||
} | ||
</style> | ||
<div id="container"> | ||
<div id="text-container"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ultrices neque eu nisi facilisis | ||
viverra. Integer lacinia, lacus vel condimentum suscipit, lacus felis porta nulla, eget | ||
lacinia sem neque ut neque. In sagittis, eros vel interdum porta, quam ex rhoncus lectus, | ||
vitae suscipit risus orci sit amet velit. Praesent imperdiet condimentum rutrum. Cras vitae | ||
nisl sapien. Curabitur ligula diam, tincidunt congue tincidunt nec, sodales nec orci. | ||
Vestibulum tincidunt non elit in vehicula. Etiam malesuada neque eu porta rhoncus. Curabitur | ||
vel nunc finibus ligula posuere venenatis. | ||
</div> | ||
</div> | ||
<script> | ||
const scrollContainer = document.getElementById("text-container"); | ||
scrollContainer.scrollTop = 300; | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<link rel="match" href="reference/scrolled-text-with-clipped-corners-ref.html" /> | ||
<style> | ||
* { | ||
scrollbar-width: none; | ||
} | ||
|
||
#container { | ||
width: 300px; | ||
height: 300px; | ||
border: 5px solid black; | ||
border-radius: 50%; | ||
overflow: scroll; | ||
font-size: 40px; | ||
} | ||
</style> | ||
<div id="container"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ultrices neque eu nisi facilisis | ||
viverra. Integer lacinia, lacus vel condimentum suscipit, lacus felis porta nulla, eget lacinia | ||
sem neque ut neque. In sagittis, eros vel interdum porta, quam ex rhoncus lectus, vitae suscipit | ||
risus orci sit amet velit. Praesent imperdiet condimentum rutrum. Cras vitae nisl sapien. | ||
Curabitur ligula diam, tincidunt congue tincidunt nec, sodales nec orci. Vestibulum tincidunt | ||
non elit in vehicula. Etiam malesuada neque eu porta rhoncus. Curabitur vel nunc finibus ligula | ||
posuere venenatis. | ||
</div> | ||
<script> | ||
const scrollContainer = document.getElementById("container"); | ||
scrollContainer.scrollTop = 300; | ||
</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