Bug 959311 - Splitting nsComboboxControlFrame makes no sense so it should always report COMPLETE reflow status. Also, make them page-break-inside:avoid by default. r=bz

This commit is contained in:
Mats Palmgren 2014-01-30 12:12:02 +00:00
parent df4bd6bd76
commit 0e6b7fff02
7 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html class="reftest-print">
<head>
<meta charset="utf-8">
<style type="text/css">
@page { size:5in 3in; margin:0in; }
div { height: 2.5in; }
select { height: 0.5in; display:block; padding:20px; page-break-inside:initial; }
</style>
</head>
<body>
<div></div>
<select>
<option>Text</option>
</select>
</body>
</html>

View File

@ -54,4 +54,5 @@ load 682684.xhtml
load 865602.html
load 944198.html
load 949891.xhtml
load 959311.html
load 960277-2.html

View File

@ -866,6 +866,12 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
buttonRect.width = buttonWidth;
mButtonFrame->SetRect(buttonRect);
if (!NS_INLINE_IS_BREAK_BEFORE(aStatus) &&
!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
// This frame didn't fit inside a fragmentation container. Splitting
// a nsComboboxControlFrame makes no sense, so we override the status here.
aStatus = NS_FRAME_COMPLETE;
}
return rv;
}

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html class="reftest-print">
<head>
<meta charset="utf-8">
<style type="text/css">
@page { size:5in 3in; margin:0in; }
div { height: 0in; }
select { height: 0.5in; display:block; padding:20px; page-break-before:always; }
</style>
</head>
<body>
<div></div>
<select>
<option>Text</option>
</select>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html class="reftest-print">
<head>
<meta charset="utf-8">
<style type="text/css">
@page { size:5in 3in; margin:0in; }
div { height: 2.5in; }
select { height: 0.5in; display:block; padding:20px; page-break-inside:avoid; }
</style>
</head>
<body>
<div></div>
<select>
<option>Text</option>
</select>
</body>
</html>

View File

@ -60,3 +60,4 @@ skip-if(B2G) == table-caption-splitaftercaption-7.html table-caption-splitafterc
# == table-caption-splitaftercaption-10.html blank.html # bug 672654
# == table-caption-splitaftercaption-11.html blank.html # bug 672654
== column-balancing-break-inside-avoid-2.html column-balancing-break-inside-avoid-2-ref.html
== combobox-page-break-inside.html combobox-page-break-inside-ref.html

View File

@ -206,6 +206,7 @@ select {
text-shadow: none;
/* No text-decoration reaching inside, by default */
display: inline-block;
page-break-inside: avoid;
}
/* Need the "select[size][multiple]" selector to override the settings on