Bug 1039009 - Handle float in the base line layout. r=dbaron

--HG--
extra : rebase_source : 981a5ae2bb8f8bf7852398ea944c6e07ed283292
extra : source : b661631e125ab0ffa2bdfa44201fe59571189423
This commit is contained in:
Xidorn Quan 2014-12-10 10:49:13 +11:00
parent c62bf329cd
commit 850081cda9
4 changed files with 46 additions and 1 deletions

View File

@ -941,7 +941,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// We might as well allow zero-width floats to be placed, though.
availableISize = 0;
}
placedFloat = AddFloat(outOfFlowFrame, availableISize);
placedFloat = mBaseLineLayout->AddFloat(outOfFlowFrame, availableISize);
NS_ASSERTION(!(outOfFlowFrame->GetType() == nsGkAtoms::letterFrame &&
GetFirstLetterStyleOK()),
"FirstLetterStyle set on line with floating first letter");

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="common.css">
<style>
ruby div {
width: 10px; height: 10px;
background-color: grey;
}
.left { float: left; }
.right { float: right; }
</style>
</head>
<body>
<div><ruby><rb><div class="left"></div>hello world</rb><rt>hello world</rt></ruby></div>
<div><ruby><rb><div class="left"></div>hello world</rb><rt>hello world</rt></ruby></div>
<div><ruby><rb><div class="right"></div>hello world</rb><rt>hello world</rt></ruby></div>
<div><ruby><rb><div class="right"></div>hello world</rb><rt>hello world</rt></ruby></div>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="common.css">
<style>
ruby div {
width: 10px; height: 10px;
background-color: grey;
}
.left { float: left; }
.right { float: right; }
</style>
</head>
<body>
<div><ruby><rb>hello world</rb><rt><div class="left"></div>hello world</rt></ruby></div>
<div><ruby><rb>hello world</rb><rt>hello<div class="left"></div> world</rt></ruby></div>
<div><ruby><rb>hello world</rb><rt><div class="right"></div>hello world</rt></ruby></div>
<div><ruby><rb>hello world</rb><rt>hello<div class="right"></div> world</rt></ruby></div>
</body>
</html>

View File

@ -11,6 +11,7 @@ default-preferences pref(layout.css.ruby.enabled,true)
== dynamic-removal-1.html dynamic-removal-1-ref.html
== dynamic-removal-2.html dynamic-removal-2-ref.html
fuzzy-if(winWidget,28,1) == dynamic-removal-3.html dynamic-removal-3-ref.html # bug 1111891
== float-handling.html float-handling-ref.html
== inlinize-blocks-1.html inlinize-blocks-1-ref.html
== inlinize-blocks-2.html inlinize-blocks-2-ref.html
== inlinize-blocks-3.html inlinize-blocks-3-ref.html