mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 06:45:42 +00:00
Don't position bullets on empty list items too high. Bug 403657, r+sr=dbaron
This commit is contained in:
parent
9a66c4091f
commit
ee48eb1bf9
@ -1081,17 +1081,18 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
ReflowBullet(state, metrics);
|
||||
|
||||
nscoord baseline;
|
||||
if (!nsLayoutUtils::GetFirstLineBaseline(this, &baseline)) {
|
||||
baseline = 0;
|
||||
if (nsLayoutUtils::GetFirstLineBaseline(this, &baseline)) {
|
||||
// We have some lines to align the bullet with.
|
||||
|
||||
// Doing the alignment using the baseline will also cater for
|
||||
// bullets that are placed next to a child block (bug 92896)
|
||||
|
||||
// Tall bullets won't look particularly nice here...
|
||||
nsRect bbox = mBullet->GetRect();
|
||||
bbox.y = baseline - metrics.ascent;
|
||||
mBullet->SetRect(bbox);
|
||||
}
|
||||
|
||||
// Doing the alignment using the baseline will also cater for
|
||||
// bullets that are placed next to a child block (bug 92896)
|
||||
|
||||
// Tall bullets won't look particularly nice here...
|
||||
nsRect bbox = mBullet->GetRect();
|
||||
bbox.y = baseline - metrics.ascent;
|
||||
mBullet->SetRect(bbox);
|
||||
// Otherwise just leave the bullet where it is, up against our top padding.
|
||||
}
|
||||
|
||||
// Compute our final size
|
||||
|
10
layout/reftests/bugs/403657-1-ref.html
Normal file
10
layout/reftests/bugs/403657-1-ref.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body
|
||||
<ol>
|
||||
<li>Some text</li>
|
||||
<li> </li>
|
||||
<li> </li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
10
layout/reftests/bugs/403657-1.html
Normal file
10
layout/reftests/bugs/403657-1.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body
|
||||
<ol>
|
||||
<li>Some text</li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
@ -471,6 +471,7 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
|
||||
== 403656-3.html 403656-3-ref.html
|
||||
== 403656-4.html 403656-4-ref.html
|
||||
== 403656-5.html 403656-5-ref.html
|
||||
== 403657-1.html 403657-1-ref.html
|
||||
== 403733-1.html 403733-1-ref.html
|
||||
== 403962-1.xhtml 403962-1-ref.xhtml
|
||||
== 404030-1.html 404030-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user