Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[CSS Regions] The background of children of scrollable elements flowe…
…d into regions is not properly scrolled https://bugs.webkit.org/show_bug.cgi?id=130574 Reviewed by David Hyatt. Source/WebCore: When computing the clip rect for painting the box decorations, the scrolled content offset must be computed by going up the containing block tree, up to the region. Tests: fast/regions/scrollable-region-scrollable-absolute-content-background.html fast/regions/scrollable-region-scrollable-content-background.html * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment): LayoutTests: Added tests for properly painting background of children of scrollable elements flowed into regions. * fast/regions/scrollable-region-scrollable-absolute-content-background-expected.html: Added. * fast/regions/scrollable-region-scrollable-absolute-content-background.html: Added. * fast/regions/scrollable-region-scrollable-content-background-expected.html: Added. * fast/regions/scrollable-region-scrollable-content-background.html: Added. Canonical link: https://commits.webkit.org/148781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
7 changed files
with
283 additions
and
3 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
63 changes: 63 additions & 0 deletions
63
...Tests/fast/regions/scrollable-region-scrollable-absolute-content-background-expected.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,63 @@ | ||
<!DOCTYPE html> | ||
<html style="font: 16px/1.25 monospace;"> | ||
<head> | ||
<script type="text/javascript"> | ||
onload = function() | ||
{ | ||
document.getElementById("container").scrollTop = 40; | ||
} | ||
</script> | ||
|
||
<style> | ||
#container { | ||
border: thick solid green; | ||
height: 150px; | ||
overflow: scroll; | ||
margin: 15px; | ||
padding: 5px; | ||
} | ||
|
||
#region { | ||
width: 400px; | ||
height: 200px; | ||
border: 2px solid blue; | ||
margin: 10px; | ||
padding: 35px; | ||
} | ||
|
||
.blueBackground { | ||
background: lightblue; | ||
} | ||
|
||
.greenBackground { | ||
background: lightgreen; | ||
position: absolute; | ||
left: 205px; | ||
top: 227px; | ||
width: 250px; | ||
} | ||
|
||
#bottomDiv { | ||
position: relative; | ||
top: 50px; | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<a style="font-size: 14px" href="https://bugs.webkit.org/show_bug.cgi?id=130574">[CSS Regions] The background of children of scrollable<br/>elements flowed into regions is not properly scrolled</a> | ||
<p>This test passes if the backgrounds of the paragraphs inside the <span style="color:green"><b>green box</b></span> is properly painted when scrolling the box.</p> | ||
|
||
<div id="region"> | ||
<div id="container"> | ||
<p class="greenBackground">This text is absolutely positioned and should have a lightgreen background.</p> | ||
|
||
<p class="blueBackground">This text should have a lightblue background which properly paints when scrolling the parent.</p> | ||
<div id="bottomDiv"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
64 changes: 64 additions & 0 deletions
64
LayoutTests/fast/regions/scrollable-region-scrollable-absolute-content-background.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,64 @@ | ||
<!DOCTYPE html> | ||
<html style="font: 16px/1.25 monospace;"> | ||
<head> | ||
<script type="text/javascript"> | ||
onload = function() | ||
{ | ||
document.getElementById("container").scrollTop = 40; | ||
} | ||
</script> | ||
|
||
<style> | ||
#container { | ||
border: thick solid green; | ||
height: 150px; | ||
overflow: scroll; | ||
margin: 15px; | ||
padding: 5px; | ||
-webkit-flow-into: flow; | ||
} | ||
|
||
#region { | ||
width: 400px; | ||
height: 200px; | ||
-webkit-flow-from: flow; | ||
border: 2px solid blue; | ||
margin: 10px; | ||
padding: 35px; | ||
} | ||
|
||
.blueBackground { | ||
background: lightblue; | ||
} | ||
|
||
.greenBackground { | ||
background: lightgreen; | ||
position: absolute; | ||
left: 150px; | ||
top: 70px; | ||
} | ||
|
||
#bottomDiv { | ||
position: relative; | ||
top: 50px; | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<a style="font-size: 14px" href="https://bugs.webkit.org/show_bug.cgi?id=130574">[CSS Regions] The background of children of scrollable<br/>elements flowed into regions is not properly scrolled</a> | ||
<p>This test passes if the backgrounds of the paragraphs inside the <span style="color:green"><b>green box</b></span> is properly painted when scrolling the box.</p> | ||
|
||
<div id="region"></div> | ||
|
||
<div id="container"> | ||
<p class="greenBackground">This text is absolutely positioned and should have a lightgreen background.</p> | ||
|
||
<p class="blueBackground">This text should have a lightblue background which properly paints when scrolling the parent.</p> | ||
<div id="bottomDiv"></div> | ||
</div> | ||
</body> | ||
</html> |
54 changes: 54 additions & 0 deletions
54
LayoutTests/fast/regions/scrollable-region-scrollable-content-background-expected.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> | ||
<html style="font: 16px/1.25 monospace;"> | ||
<head> | ||
<script type="text/javascript"> | ||
onload = function() | ||
{ | ||
document.getElementById("container").scrollTop = 20; | ||
} | ||
</script> | ||
|
||
<style> | ||
#container { | ||
border: thick solid green; | ||
height: 150px; | ||
overflow: scroll; | ||
margin: 15px; | ||
padding: 5px; | ||
} | ||
|
||
#region { | ||
width: 300px; | ||
height: 200px; | ||
border: 2px solid blue; | ||
margin: 10px; | ||
padding: 35px; | ||
} | ||
|
||
.blueBackground { | ||
background: lightblue; | ||
} | ||
|
||
#bottomDiv { | ||
position: relative; | ||
top: 50px; | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<a style="font-size: 14px" href="https://bugs.webkit.org/show_bug.cgi?id=130574">[CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled</a> | ||
<p>This test passes if the <span style="color:lightblue"><b>background</b></span> of the paragraphs inside the <span style="color:green"><b>green box</b></span> is properly painted when scrolling the box.</p> | ||
|
||
<div id="region"> | ||
<div id="container"> | ||
<p class="blueBackground">This text should have a lightblue background which properly paints when scrolling the parent.</p> | ||
<p class="blueBackground">This text should have a lightblue background which properly paints when scrolling the parent.</p> | ||
<div id="bottomDiv"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
56 changes: 56 additions & 0 deletions
56
LayoutTests/fast/regions/scrollable-region-scrollable-content-background.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,56 @@ | ||
<!DOCTYPE html> | ||
<html style="font: 16px/1.25 monospace;"> | ||
<head> | ||
<script type="text/javascript"> | ||
onload = function() | ||
{ | ||
document.getElementById("container").scrollTop = 20; | ||
} | ||
</script> | ||
|
||
<style> | ||
#container { | ||
border: thick solid green; | ||
height: 150px; | ||
overflow: scroll; | ||
margin: 15px; | ||
padding: 5px; | ||
-webkit-flow-into: flow; | ||
} | ||
|
||
#region { | ||
width: 300px; | ||
height: 200px; | ||
-webkit-flow-from: flow; | ||
border: 2px solid blue; | ||
margin: 10px; | ||
padding: 35px; | ||
} | ||
|
||
.blueBackground { | ||
background: lightblue; | ||
} | ||
|
||
#bottomDiv { | ||
position: relative; | ||
top: 50px; | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<a style="font-size: 14px" href="https://bugs.webkit.org/show_bug.cgi?id=130574">[CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled</a> | ||
<p>This test passes if the <span style="color:lightblue"><b>background</b></span> of the paragraphs inside the <span style="color:green"><b>green box</b></span> is properly painted when scrolling the box.</p> | ||
|
||
<div id="region"></div> | ||
|
||
<div id="container"> | ||
<p class="blueBackground">This text should have a lightblue background which properly paints when scrolling the parent.</p> | ||
<p class="blueBackground">This text should have a lightblue background which properly paints when scrolling the parent.</p> | ||
<div id="bottomDiv"></div> | ||
</div> | ||
</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
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