Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r184373 - Images on www.fitstylelife.com jiggle on hover.
https://bugs.webkit.org/show_bug.cgi?id=145020 rdar://problem/20885337 Reviewed by Simon Fraser. This patch ensures that the clipping layer of a composited content is pixel snapped properly. Source/WebCore: Tests: compositing/composited-parent-clipping-layer-on-subpixel-position.html compositing/parent-clipping-layer-on-subpixel-position.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): LayoutTests: * compositing/composited-parent-clipping-layer-on-subpixel-position-expected.html: Added. * compositing/composited-parent-clipping-layer-on-subpixel-position.html: Added. * compositing/parent-clipping-layer-on-subpixel-position-expected.html: Added. * compositing/parent-clipping-layer-on-subpixel-position.html: Added.
- Loading branch information
1 parent
48d03fc
commit 2446ebd
Showing
7 changed files
with
213 additions
and
1 deletion.
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
45 changes: 45 additions & 0 deletions
45
LayoutTests/compositing/composited-parent-clipping-layer-on-subpixel-position-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,45 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that when the composited parent container enforces clipping and it is on a subpixel position, we snap composited child content properly.</title> | ||
<style> | ||
.container { | ||
width: 15px; | ||
height: 15px; | ||
position: absolute; | ||
-webkit-transform: translateZ(0); | ||
} | ||
|
||
.inner { | ||
width: 10px; | ||
height: 10px; | ||
border: 1px solid red; | ||
-webkit-transform: translateZ(0); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
</div> | ||
<script> | ||
var body = document.body; | ||
var x = 0; | ||
var y = 0; | ||
for (i = 0; i < 20; ++i) { | ||
y = 0; | ||
for (j = 0; j < 20; ++j) { | ||
var container = document.createElement("div"); | ||
container.style.top = 15 * i + y + "px"; | ||
container.style.left = 15 * j + x + "px"; | ||
container.className = "container"; | ||
body.appendChild(container); | ||
|
||
var inner = document.createElement("div"); | ||
inner.className = "inner"; | ||
container.appendChild(inner); | ||
y += 0.1; | ||
} | ||
x += 0.1; | ||
} | ||
</script> | ||
</body> | ||
</html> |
46 changes: 46 additions & 0 deletions
46
LayoutTests/compositing/composited-parent-clipping-layer-on-subpixel-position.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,46 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that when the composited parent container enforces clipping and it is on a subpixel position, we snap child content properly.</title> | ||
<style> | ||
.container { | ||
width: 15px; | ||
height: 15px; | ||
position: absolute; | ||
overflow: hidden; | ||
-webkit-transform: translateZ(0); | ||
} | ||
|
||
.inner { | ||
width: 10px; | ||
height: 10px; | ||
border: 1px solid red; | ||
-webkit-transform: translateZ(0); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
</div> | ||
<script> | ||
var body = document.body; | ||
var x = 0; | ||
var y = 0; | ||
for (i = 0; i < 20; ++i) { | ||
y = 0; | ||
for (j = 0; j < 20; ++j) { | ||
var container = document.createElement("div"); | ||
container.style.top = 15 * i + y + "px"; | ||
container.style.left = 15 * j + x + "px"; | ||
container.className = "container"; | ||
body.appendChild(container); | ||
|
||
var inner = document.createElement("div"); | ||
inner.className = "inner"; | ||
container.appendChild(inner); | ||
y += 0.1; | ||
} | ||
x += 0.1; | ||
} | ||
</script> | ||
</body> | ||
</html> |
44 changes: 44 additions & 0 deletions
44
LayoutTests/compositing/parent-clipping-layer-on-subpixel-position-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,44 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that when the parent container enforces clipping and it is on a subpixel position, we snap child content properly.</title> | ||
<style> | ||
.container { | ||
width: 15px; | ||
height: 15px; | ||
position: absolute; | ||
} | ||
|
||
.inner { | ||
width: 10px; | ||
height: 10px; | ||
border: 1px solid red; | ||
-webkit-transform: translateZ(0); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
</div> | ||
<script> | ||
var body = document.body; | ||
var x = 0; | ||
var y = 0; | ||
for (i = 0; i < 20; ++i) { | ||
y = 0; | ||
for (j = 0; j < 20; ++j) { | ||
var container = document.createElement("div"); | ||
container.style.top = 15 * i + y + "px"; | ||
container.style.left = 15 * j + x + "px"; | ||
container.className = "container"; | ||
body.appendChild(container); | ||
|
||
var inner = document.createElement("div"); | ||
inner.className = "inner"; | ||
container.appendChild(inner); | ||
y += 0.1; | ||
} | ||
x += 0.1; | ||
} | ||
</script> | ||
</body> | ||
</html> |
45 changes: 45 additions & 0 deletions
45
LayoutTests/compositing/parent-clipping-layer-on-subpixel-position.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,45 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that when the parent container enforces clipping and it is on a subpixel position, we snap child content properly.</title> | ||
<style> | ||
.container { | ||
width: 15px; | ||
height: 15px; | ||
position: absolute; | ||
overflow: hidden; | ||
} | ||
|
||
.inner { | ||
width: 10px; | ||
height: 10px; | ||
border: 1px solid red; | ||
-webkit-transform: translateZ(0); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
</div> | ||
<script> | ||
var body = document.body; | ||
var x = 0; | ||
var y = 0; | ||
for (i = 0; i < 20; ++i) { | ||
y = 0; | ||
for (j = 0; j < 20; ++j) { | ||
var container = document.createElement("div"); | ||
container.style.top = 15 * i + y + "px"; | ||
container.style.left = 15 * j + x + "px"; | ||
container.className = "container"; | ||
body.appendChild(container); | ||
|
||
var inner = document.createElement("div"); | ||
inner.className = "inner"; | ||
container.appendChild(inner); | ||
y += 0.1; | ||
} | ||
x += 0.1; | ||
} | ||
</script> | ||
</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