# HG changeset patch # Parent e324f07b688105cd9f35cead8e5a497889d0e5d6 # User Mats Palmgren 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 diff --git a/layout/forms/crashtests/959311.html b/layout/forms/crashtests/959311.html new file mode 100644 --- /dev/null +++ b/layout/forms/crashtests/959311.html @@ -0,0 +1,17 @@ + + + + + + + +
+ + + diff --git a/layout/forms/crashtests/crashtests.list b/layout/forms/crashtests/crashtests.list --- a/layout/forms/crashtests/crashtests.list +++ b/layout/forms/crashtests/crashtests.list @@ -49,9 +49,10 @@ asserts(1) load 578604-1.html # bug 5845 asserts(4-7) load 590302-1.xhtml # bug 584564 load 626014.xhtml load 639733.xhtml asserts(0-1) load 669767.html load 682684.xhtml load 865602.html load 944198.html load 949891.xhtml +load 959311.html load 960277-2.html diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -861,16 +861,22 @@ nsComboboxControlFrame::Reflow(nsPresCon if (StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) { // Make sure the right edge of the button frame stays where it is now buttonRect.x -= buttonWidth - buttonRect.width; } 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; } //-------------------------------------------------------------- nsIAtom* nsComboboxControlFrame::GetType() const { diff --git a/layout/reftests/pagination/combobox-page-break-inside-ref.html b/layout/reftests/pagination/combobox-page-break-inside-ref.html new file mode 100644 --- /dev/null +++ b/layout/reftests/pagination/combobox-page-break-inside-ref.html @@ -0,0 +1,17 @@ + + + + + + + +
+ + + diff --git a/layout/reftests/pagination/combobox-page-break-inside.html b/layout/reftests/pagination/combobox-page-break-inside.html new file mode 100644 --- /dev/null +++ b/layout/reftests/pagination/combobox-page-break-inside.html @@ -0,0 +1,17 @@ + + + + + + + +
+ + + diff --git a/layout/reftests/pagination/reftest.list b/layout/reftests/pagination/reftest.list --- a/layout/reftests/pagination/reftest.list +++ b/layout/reftests/pagination/reftest.list @@ -55,8 +55,9 @@ skip-if(B2G) == table-caption-splitafter skip-if(B2G) == table-caption-splitaftercaption-5.html table-caption-splitaftercaption-5-ref.html # bug 773482 skip-if(B2G) == table-caption-splitaftercaption-6.html table-caption-splitaftercaption-6-ref.html # bug 773482 skip-if(B2G) == table-caption-splitaftercaption-7.html table-caption-splitaftercaption-7-ref.html # bug 773482 # == table-caption-splitaftercaption-8.html blank.html # bug 672654 # == table-caption-splitaftercaption-9.html blank.html # bug 672654 # == 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 diff --git a/layout/style/forms.css b/layout/style/forms.css --- a/layout/style/forms.css +++ b/layout/style/forms.css @@ -201,16 +201,17 @@ select { -moz-appearance: menulist; border-width: 2px; border-style: inset; text-indent: 0; overflow: -moz-hidden-unscrollable; 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 'select[size="1"]', eg if one has