mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1178382 - Ignore overflow: -moz-hidden-unscrollable on <select size=n> listboxes. r=roc
forms.css sets overflow: -moz-hidden-unscrollable on all select elements. ApplyOverflowClipping in nsFrame.cpp applies overflow clips that are not managed by scroll frames. nsCSSFrameConstructor::ConstructSelectFrame creates an nsListControlFrame for listbox select elements. nsListControlFrame is an nsHTMLScrollFrame. As a result, the clip as applied twice - once by the nsHTMLScrollFrame, and then again by ApplyOverflowClipping. Adding an exception for nsListControlFrame to ShouldApplyOverflowClipping gets rid of the double clip. But we still need to apply the clip when calculating the frame's visual overflow rect, so we add the list box frame type to the list of special-cased frames in UnionBorderBoxes.
This commit is contained in:
parent
93ae940ac1
commit
f93bc01b67
@ -7343,6 +7343,7 @@ UnionBorderBoxes(nsIFrame* aFrame, bool aApplyTransform,
|
||||
nsIAtom* fType = aFrame->GetType();
|
||||
if (nsFrame::ShouldApplyOverflowClipping(aFrame, disp) ||
|
||||
fType == nsGkAtoms::scrollFrame ||
|
||||
fType == nsGkAtoms::listControlFrame ||
|
||||
fType == nsGkAtoms::svgOuterSVGFrame) {
|
||||
return u;
|
||||
}
|
||||
|
@ -582,8 +582,10 @@ public:
|
||||
static bool ShouldApplyOverflowClipping(const nsIFrame* aFrame,
|
||||
const nsStyleDisplay* aDisp)
|
||||
{
|
||||
// clip overflow:-moz-hidden-unscrollable ...
|
||||
if (MOZ_UNLIKELY(aDisp->mOverflowX == NS_STYLE_OVERFLOW_CLIP)) {
|
||||
// clip overflow:-moz-hidden-unscrollable, except for nsListControlFrame,
|
||||
// which is an nsHTMLScrollFrame.
|
||||
if (MOZ_UNLIKELY(aDisp->mOverflowX == NS_STYLE_OVERFLOW_CLIP &&
|
||||
aFrame->GetType() != nsGkAtoms::listControlFrame)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user