mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Auto merge of #14475 - mrobinson:backrounds-borders-scrolling-div, r=pcwalton
Don't scroll background and borders of overflow:scroll blocks <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> 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. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14475) <!-- Reviewable:end -->
This commit is contained in:
commit
900cb3b142
5 changed files with 85 additions and 8 deletions
|
@ -6414,6 +6414,18 @@
|
|||
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
|
||||
}
|
||||
],
|
||||
"mozilla/scrolling_div_background_borders.html": [
|
||||
{
|
||||
"path": "mozilla/scrolling_div_background_borders.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/scrolling_div_background_borders_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/scrolling_div_background_borders.html"
|
||||
}
|
||||
],
|
||||
"mozilla/simple_scroll_to_fragment.html": [
|
||||
{
|
||||
"path": "mozilla/simple_scroll_to_fragment.html",
|
||||
|
@ -21444,6 +21456,18 @@
|
|||
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
|
||||
}
|
||||
],
|
||||
"mozilla/scrolling_div_background_borders.html": [
|
||||
{
|
||||
"path": "mozilla/scrolling_div_background_borders.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/scrolling_div_background_borders_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/scrolling_div_background_borders.html"
|
||||
}
|
||||
],
|
||||
"mozilla/simple_scroll_to_fragment.html": [
|
||||
{
|
||||
"path": "mozilla/simple_scroll_to_fragment.html",
|
||||
|
|
|
@ -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 not shown.
After Width: | Height: | Size: 366 B |
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue