forked from adobe/webkit
-
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.
[CSS Regions] Elements using transforms are not repainted correctly w…
…hen rendered in a region https://bugs.webkit.org/show_bug.cgi?id=102826 Reviewed by David Hyatt. Source/WebCore: When the page is composited, all the elements will have a composited repaint container. In that case we will never catch the repaints in the RenderFlowThread, but they will go directly to the RenderView. There's a single case when the parent composited layer of an element inside the RenderFlowThread will get its own repaints. That case only happens when the parent composited layer is also part of the same flow thread. Right now compositing is disabled for elements inside the RenderFlowThread, so that case doesn't even happen yet. That will be fixed in https://bugs.webkit.org/show_bug.cgi?id=84900. Test: fast/repaint/region-painting-in-composited-view.html * rendering/RenderObject.cpp: (WebCore::RenderObject::containerForRepaint): LayoutTests: Added test file to check for repainting inside a RenderFlowThread when the page is in composited mode. * fast/repaint/region-painting-in-composited-view-expected.html: Added. * fast/repaint/region-painting-in-composited-view.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
4ebfa13
commit a62ca72
Showing
5 changed files
with
136 additions
and
5 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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
2012-11-27 Alexandru Chiculita <[email protected]> | ||
|
||
[CSS Regions] Elements using transforms are not repainted correctly when rendered in a region | ||
https://bugs.webkit.org/show_bug.cgi?id=102826 | ||
|
||
Reviewed by David Hyatt. | ||
|
||
Added test file to check for repainting inside a RenderFlowThread when the page is in composited mode. | ||
|
||
* fast/repaint/region-painting-in-composited-view-expected.html: Added. | ||
* fast/repaint/region-painting-in-composited-view.html: Added. | ||
|
||
2012-11-27 Tony Chang <[email protected]> | ||
|
||
Unreviewed, updating TestExpectations after input slider change. | ||
|
39 changes: 39 additions & 0 deletions
39
LayoutTests/fast/repaint/region-painting-in-composited-view-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,39 @@ | ||
<!doctype html> | ||
<head> | ||
<title>Test for https://bugs.webkit.org/show_bug.cgi?id=102826</title> | ||
<style type="text/css"> | ||
#region1, #region2 { | ||
position: absolute; | ||
top: 0px; | ||
left: 0px; | ||
width: 100px; | ||
height: 50px; | ||
} | ||
|
||
#region1 { | ||
left: 120px; | ||
background-color: red; | ||
/* We need a composited layer, to make the output | ||
exactly the same as the test file. */ | ||
-webkit-transform: translate3d(0,0,0); | ||
} | ||
|
||
#region2 { | ||
background-color: green; | ||
} | ||
|
||
</style> | ||
<script src="resources/repaint.js" type="text/javascript"></script> | ||
<script> | ||
function repaintTest() | ||
{ | ||
// Using the same repaint behavior, so that we get the same repaint area. | ||
document.getElementById('region1').style.backgroundColor = 'green'; | ||
} | ||
</script> | ||
</head> | ||
<body onload="runRepaintTest();"> | ||
<div id="region1"></div> | ||
<div id="region2"></div> | ||
</body> | ||
</html> |
58 changes: 58 additions & 0 deletions
58
LayoutTests/fast/repaint/region-painting-in-composited-view.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,58 @@ | ||
<!doctype html> | ||
<head> | ||
<title>Test for https://bugs.webkit.org/show_bug.cgi?id=102826</title> | ||
<script> | ||
if (window.testRunner) | ||
window.testRunner.overridePreference("WebKitCSSRegionsEnabled", "1"); | ||
</script> | ||
<style type="text/css"> | ||
#content { | ||
-webkit-flow-into: flow1; | ||
} | ||
|
||
#target { | ||
background: red; | ||
width: 100px; | ||
height: 50px; | ||
} | ||
|
||
#region1, #region2 { | ||
position: absolute; | ||
top: 0px; | ||
width: 100px; | ||
height: 50px; | ||
-webkit-flow-from: flow1; | ||
} | ||
|
||
#region1 { | ||
/* Make sure that the content of the first region will display in a totally | ||
different place than it would have been displayed if regions were not used. */ | ||
left: 120px; | ||
/* Force the composited mode on the current page. */ | ||
-webkit-transform: translate3d(0,0,0); | ||
} | ||
|
||
#region2 { | ||
left: 0px; | ||
background-color: green; | ||
} | ||
|
||
</style> | ||
<script src="resources/repaint.js" type="text/javascript"></script> | ||
<script> | ||
function repaintTest() | ||
{ | ||
document.getElementById('target').style.backgroundColor = 'green'; | ||
} | ||
</script> | ||
</head> | ||
<body onload="runRepaintTest();"> | ||
<!-- Testing that the repaint goes through the RenderRegions and not | ||
directly to the viewport. You should see two green rectangles. --> | ||
<div id="content"> | ||
<div id="target"></div> | ||
</div> | ||
<div id="region1"></div> | ||
<div id="region2"></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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
2012-11-27 Alexandru Chiculita <[email protected]> | ||
|
||
[CSS Regions] Elements using transforms are not repainted correctly when rendered in a region | ||
https://bugs.webkit.org/show_bug.cgi?id=102826 | ||
|
||
Reviewed by David Hyatt. | ||
|
||
When the page is composited, all the elements will have a composited repaint container. In that case we will | ||
never catch the repaints in the RenderFlowThread, but they will go directly to the RenderView. | ||
There's a single case when the parent composited layer of an element inside the RenderFlowThread will get | ||
its own repaints. That case only happens when the parent composited layer is also part of the same flow thread. | ||
Right now compositing is disabled for elements inside the RenderFlowThread, so that case doesn't even happen yet. | ||
That will be fixed in https://bugs.webkit.org/show_bug.cgi?id=84900. | ||
|
||
Test: fast/repaint/region-painting-in-composited-view.html | ||
|
||
* rendering/RenderObject.cpp: | ||
(WebCore::RenderObject::containerForRepaint): | ||
|
||
2012-11-27 Tony Chang <[email protected]> | ||
|
||
Unreviewed, win compile fix take 2. | ||
|
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