Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r232663 - REGRESSION (r230480): Cannot adjust photo position on…
… LinkedIn's profile page https://bugs.webkit.org/show_bug.cgi?id=186464 <rdar://problem/40369448> Reviewed by Simon Fraser. Source/WebCore: The optimization logic for skipping image layout when we only need overflow computation should check if the image actually needs simplified layout only. The needsSimplifiedNormalFlowLayout() flag means that the overflow information needs to be updated but it does not mean that overflow is the only property that we need to recompute. Test: fast/images/positioned-image-when-transform-is-present.html * rendering/RenderImage.cpp: (WebCore::RenderImage::layout): * rendering/RenderObject.h: (WebCore::RenderObject::needsSimplifiedNormalFlowLayoutOnly const): LayoutTests: * fast/images/positioned-image-when-transform-is-present-expected.html: Added. * fast/images/positioned-image-when-transform-is-present.html: Added.
- Loading branch information
1 parent
e3696fc
commit f58d194
Showing
6 changed files
with
79 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
9 changes: 9 additions & 0 deletions
9
LayoutTests/fast/images/positioned-image-when-transform-is-present-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,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that we reposition the image when transform is present.</title> | ||
</head> | ||
<body> | ||
PASS if the image disappears completely. | ||
</body> | ||
</html> |
32 changes: 32 additions & 0 deletions
32
LayoutTests/fast/images/positioned-image-when-transform-is-present.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,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that we reposition the image when transform is present.</title> | ||
<style> | ||
img { | ||
position: absolute; | ||
top: 10px; | ||
left: 10px; | ||
width: 100px; | ||
height: 100px; | ||
transform: translateX(0px); | ||
} | ||
|
||
div { | ||
position: relative; | ||
width: 100px; | ||
height: 100px; | ||
overflow: hidden; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
PASS if the image disappears completely. | ||
<div><img id=moveOut src="foobar-broken.jpg"></div> | ||
<script> | ||
document.body.offsetHeight; | ||
moveOut.style.transform = "translateX(1px)"; | ||
moveOut.style.left = "200px"; | ||
</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
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