diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 259e1c3684c5..9aa604ff7d07 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -357,14 +357,8 @@ nscoord nsComboboxControlFrame::GetIntrinsicISize(gfxContext* aRenderingContext, displayISize += maxOptionSize; } - // Add room for the dropmarker button (if there is one) and scrollbar on the - // popup. + // Add room for the dropmarker button (if there is one). displayISize += DropDownButtonISize(); - nsPresContext* pc = PresContext(); - if (!pc->UseOverlayScrollbars()) { - displayISize += nsIScrollableFrame::GetNondisappearingScrollbarWidth( - pc, GetWritingMode()); - } return displayISize; } diff --git a/layout/reftests/forms/select/intrinsic-size-scrollbar.html b/layout/reftests/forms/select/intrinsic-size-scrollbar.html new file mode 100644 index 000000000000..091bd989c553 --- /dev/null +++ b/layout/reftests/forms/select/intrinsic-size-scrollbar.html @@ -0,0 +1,2 @@ + + diff --git a/layout/reftests/forms/select/reftest.list b/layout/reftests/forms/select/reftest.list index 3462bc1bc88f..1f6b9390f8a1 100644 --- a/layout/reftests/forms/select/reftest.list +++ b/layout/reftests/forms/select/reftest.list @@ -20,3 +20,4 @@ skip-if(Android) == select-option-display-none-inline-size.html select-option-di skip-if(Android||winWidget) == themed-select-padding-no-clip.html themed-select-padding-no-clip-ref.html == select-scrollbar-width.html select-scrollbar-width-ref.html +test-pref(ui.useOverlayScrollbars,0) ref-pref(ui.useOverlayScrollbars,1) == intrinsic-size-scrollbar.html intrinsic-size-scrollbar.html