Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r176619 - Twitter avatar moves when hovering/unhovering the "fo…
…llow" button. https://bugs.webkit.org/show_bug.cgi?id=139147 rdar://problem/19096508 Reviewed by Simon Fraser. This patch ensures that the out of flow positioned render boxes (RenderReplaced) do not get repositioned when their inline box wrappers move. Ideally, out of flow positioned renderers do not have inline wrappers by the time we start placing inline boxes, but in certain case (optimized code path for descendantsHaveSameLineHeightAndBaseline()), they are still part of the inline box tree. This patch prevents those renderer boxes from getting positioned as part of the inline box placement. They will get removed later at RenderBlockFlow::computeBlockDirectionPositionsForLine(). Source/WebCore: Test: fast/inline/out-of-flow-positioned-render-replaced-box-moves.html * rendering/InlineBox.cpp: (WebCore::InlineBox::adjustPosition): LayoutTests: * fast/inline/out-of-flow-positioned-render-replaced-box-moves-expected.html: Added. * fast/inline/out-of-flow-positioned-render-replaced-box-moves.html: Added. Canonical link: https://commits.webkit.org/154760.245@webkitgtk/2.6 git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@178282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
e41740c
commit 8e18924
Showing
5 changed files
with
108 additions
and
0 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
30 changes: 30 additions & 0 deletions
30
LayoutTests/fast/inline/out-of-flow-positioned-render-replaced-box-moves-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,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that when inline content gets changed (width changes), the out of flow positioned element on the same line does not move.</title> | ||
<style> | ||
h2 { | ||
display: inline; | ||
line-height: 300px; | ||
} | ||
|
||
img { | ||
position: absolute; | ||
top: 100px; | ||
left: 100px; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
button { | ||
width: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h2> | ||
<a><img src="foo.png">foobar</a> | ||
</h2> | ||
<button>button</button> | ||
</body> | ||
</html> |
35 changes: 35 additions & 0 deletions
35
LayoutTests/fast/inline/out-of-flow-positioned-render-replaced-box-moves.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,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>This tests that when inline content gets changed (width changes), the out of flow positioned element on the same line does not move.</title> | ||
<style> | ||
h2 { | ||
display: inline; | ||
line-height: 300px; | ||
} | ||
|
||
img { | ||
position: absolute; | ||
top: 100px; | ||
left: 100px; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h2> | ||
<a><img src="foo.png">foobar</a> | ||
</h2> | ||
<button id=changethis>button</button> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
setTimeout(function() { | ||
document.getElementById("changethis").style.width = "100px"; | ||
if (window.testRunner) | ||
testRunner.notifyDone(); | ||
}, 10); | ||
</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