Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't scroll background and borders of overflow:scroll blocks
We want them to be children of the parent scrolling root instead of the scrolling root of the particular block they belong to. Also, we adjust the scroll root to only include the content region.
- Loading branch information
Showing
5 changed files
with
85 additions
and
8 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
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
25 changes: 25 additions & 0 deletions
25
tests/wpt/mozilla/tests/mozilla/scrolling_div_background_borders.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,25 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>Background and borders of scrolling div should not scroll</title> | ||
<link rel="match" href="scrolling_div_background_borders_ref.html"> | ||
<body> | ||
<style> | ||
#scroller { | ||
background: url('scrolling_div_background_borders_background.png'), green; | ||
height: 100px; | ||
width: 100px; | ||
overflow: scroll; | ||
border: solid blue 10px; | ||
} | ||
</style> | ||
|
||
<!-- We are testing that background and borders don't scroll with the content | ||
and that the content doesn't overlap the borders when it scrolls. --> | ||
<div id="scroller"> | ||
<div style="width: 100px; height: 200px; background: green;"></div> | ||
</div> | ||
|
||
<script> | ||
document.getElementById("scroller").scrollTop = 100; | ||
</script> | ||
</body> |
Binary file added
BIN
+366 Bytes
tests/wpt/mozilla/tests/mozilla/scrolling_div_background_borders_background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
tests/wpt/mozilla/tests/mozilla/scrolling_div_background_borders_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,13 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<body> | ||
<style> | ||
#box { | ||
background: green; | ||
height: 100px; | ||
width: 100px; | ||
border: solid blue 10px; | ||
} | ||
</style> | ||
<div id="box"></div> | ||
</body> |