diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index b0603d7945eb..7b4610d74eae 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -556,7 +556,11 @@ void nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext, // Looks like we have no options. Just size us to a single row // block size. state.SetComputedBSize(blockSizeOfARow); - mNumDisplayRows = 1; + // mNumDisplayRows is used as the number of options to move for the page + // up/down keys. If we're in a content process, we can't calculate + // mNumDisplayRows properly, but the maximum number of rows is a lot more + // uesful for page up/down than 1. + mNumDisplayRows = XRE_IsContentProcess() ? kMaxDropDownRows : 1; } else { nsComboboxControlFrame* combobox = static_cast(mComboboxFrame); diff --git a/layout/forms/test/mochitest.ini b/layout/forms/test/mochitest.ini index 1ac780aef0d3..a09ca738924f 100644 --- a/layout/forms/test/mochitest.ini +++ b/layout/forms/test/mochitest.ini @@ -72,3 +72,5 @@ skip-if = toolkit == 'android' [test_bug1529036.html] [test_readonly.html] [test_select_key_navigation_bug1498769.html] +[test_select_collapsed_page_keys.html] +skip-if = os == 'mac' # select control keyboard behavior is different diff --git a/layout/forms/test/test_select_collapsed_page_keys.html b/layout/forms/test/test_select_collapsed_page_keys.html new file mode 100644 index 000000000000..08c161515221 --- /dev/null +++ b/layout/forms/test/test_select_collapsed_page_keys.html @@ -0,0 +1,43 @@ + + + + +Test for page up/down in collapsed select (bug 1488828) + + + + + + +
+ + +
+
+
+ +