Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r166428 - In some situations, partial layouts of floating eleme…
…nts produce incorrect results. https://bugs.webkit.org/show_bug.cgi?id=122668 Reviewed by David Hyatt. Source/WebCore: When performing partial layout of float elements and checking if other float elements are encountered, incorrect results were obtained by not checking the size of the existing floats vector. Test: fast/block/float/floats-in-clean-line-crash.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::checkFloatsInCleanLine): LayoutTests: Added test to ensure an assertion is not reached when performing a partial layout of float elements in certain situations. * fast/block/float/floats-in-clean-line-crash-expected.txt: Added. * fast/block/float/floats-in-clean-line-crash.html: Added.
- Loading branch information
1 parent
1dbfdb3
commit 41d51b9
Showing
5 changed files
with
86 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
4 changes: 4 additions & 0 deletions
4
LayoutTests/fast/block/float/floats-in-clean-line-crash-expected.txt
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,4 @@ | ||
Bug 122668 - The test passes if it doesn't crash | ||
1 | ||
A2 | ||
|
48 changes: 48 additions & 0 deletions
48
LayoutTests/fast/block/float/floats-in-clean-line-crash.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,48 @@ | ||
<html> | ||
<style> | ||
html { | ||
height:100%; | ||
} | ||
|
||
.test { | ||
float:left; | ||
} | ||
</style> | ||
|
||
<body> | ||
<a href="https://bugs.webkit.org/show_bug.cgi?id=122668">Bug 122668 - The test passes if it doesn't crash</a> | ||
<br id="br"> | ||
<div class="test">1</div> | ||
<div>A<div class="test">2</div><span id="span"></span></div> | ||
</body> | ||
|
||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
|
||
var br = document.getElementById("br"); | ||
elem = document.getElementById("span"); | ||
document.body.parentNode.insertBefore(elem, document.body.nextSibling); | ||
try | ||
{ | ||
document.getElementById("br").lookupNamespacePrefix("text", document.getElementById("br")); | ||
} | ||
catch(e) | ||
{ | ||
} | ||
|
||
var canvas = document.createElement("canvas"); | ||
canvas.setAttribute("height", "1226"); | ||
canvas.setAttribute("width", "3391"); | ||
br.parentNode.insertBefore(canvas, br.nextSibling); | ||
var ctx = canvas.getContext("2d"); | ||
ctx.strokeRect(br.appendChild(document.createElement("olist")).offsetLeft, 65535, 11111111111111111111111111111111, 9223372036); | ||
head = document.getElementsByTagName("head")[0]; | ||
var style = document.createElement("style"); | ||
style.innerHTML=":first-of-type { \n\ | ||
position: fixed;\n\ | ||
} \n\ | ||
"; | ||
head.appendChild(style); | ||
</script> | ||
</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