mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
r=rods, sr=watersin Patch from simon montagu - cleanup combobox code in Bidi case
This commit is contained in:
parent
bbd9ace80f
commit
9c301478f8
@ -1083,27 +1083,19 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
const nsStyleVisibility* vis;
|
||||
GetStyleData(eStyleStruct_Visibility, (const nsStyleStruct*&)vis);
|
||||
|
||||
if (vis->mDirection == NS_STYLE_DIRECTION_RTL)
|
||||
{
|
||||
if (vis->mDirection == NS_STYLE_DIRECTION_RTL) {
|
||||
nscoord bidiScrolledAreaWidth = scrolledAreaDesiredSize.maxElementSize->width;
|
||||
firstPassState.reason = eReflowReason_StyleChange;
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
if (aReflowState.mComputedWidth == NS_UNCONSTRAINEDSIZE)
|
||||
{
|
||||
if (needsVerticalScrollbar) {
|
||||
bidiScrolledAreaWidth -= scrollbarWidth;
|
||||
} else {
|
||||
bidiScrolledAreaWidth = aReflowState.mComputedWidth - scrollbarWidth + (6 * p2t);
|
||||
if (needsVerticalScrollbar) bidiScrolledAreaWidth -= scrollbarWidth;
|
||||
}
|
||||
|
||||
bidiScrolledAreaWidth -= (aReflowState.mComputedBorderPadding.left + aReflowState.mComputedBorderPadding.right);
|
||||
|
||||
firstPassState.mComputedWidth = bidiScrolledAreaWidth;
|
||||
firstPassState.availableWidth = bidiScrolledAreaWidth;
|
||||
nsScrollFrame::Reflow(aPresContext, aDesiredSize, firstPassState, aStatus);
|
||||
if (aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE) {
|
||||
bidiScrolledAreaWidth = aReflowState.mComputedWidth;
|
||||
}
|
||||
if (needsVerticalScrollbar) {
|
||||
bidiScrolledAreaWidth -= scrollbarWidth;
|
||||
}
|
||||
|
||||
firstPassState.mComputedWidth = bidiScrolledAreaWidth;
|
||||
firstPassState.availableWidth = bidiScrolledAreaWidth;
|
||||
nsScrollFrame::Reflow(aPresContext, aDesiredSize, firstPassState, aStatus);
|
||||
}
|
||||
#endif // IBMBIDI
|
||||
|
||||
|
@ -1083,27 +1083,19 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
const nsStyleVisibility* vis;
|
||||
GetStyleData(eStyleStruct_Visibility, (const nsStyleStruct*&)vis);
|
||||
|
||||
if (vis->mDirection == NS_STYLE_DIRECTION_RTL)
|
||||
{
|
||||
if (vis->mDirection == NS_STYLE_DIRECTION_RTL) {
|
||||
nscoord bidiScrolledAreaWidth = scrolledAreaDesiredSize.maxElementSize->width;
|
||||
firstPassState.reason = eReflowReason_StyleChange;
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
if (aReflowState.mComputedWidth == NS_UNCONSTRAINEDSIZE)
|
||||
{
|
||||
if (needsVerticalScrollbar) {
|
||||
bidiScrolledAreaWidth -= scrollbarWidth;
|
||||
} else {
|
||||
bidiScrolledAreaWidth = aReflowState.mComputedWidth - scrollbarWidth + (6 * p2t);
|
||||
if (needsVerticalScrollbar) bidiScrolledAreaWidth -= scrollbarWidth;
|
||||
}
|
||||
|
||||
bidiScrolledAreaWidth -= (aReflowState.mComputedBorderPadding.left + aReflowState.mComputedBorderPadding.right);
|
||||
|
||||
firstPassState.mComputedWidth = bidiScrolledAreaWidth;
|
||||
firstPassState.availableWidth = bidiScrolledAreaWidth;
|
||||
nsScrollFrame::Reflow(aPresContext, aDesiredSize, firstPassState, aStatus);
|
||||
if (aReflowState.mComputedWidth != NS_UNCONSTRAINEDSIZE) {
|
||||
bidiScrolledAreaWidth = aReflowState.mComputedWidth;
|
||||
}
|
||||
if (needsVerticalScrollbar) {
|
||||
bidiScrolledAreaWidth -= scrollbarWidth;
|
||||
}
|
||||
|
||||
firstPassState.mComputedWidth = bidiScrolledAreaWidth;
|
||||
firstPassState.availableWidth = bidiScrolledAreaWidth;
|
||||
nsScrollFrame::Reflow(aPresContext, aDesiredSize, firstPassState, aStatus);
|
||||
}
|
||||
#endif // IBMBIDI
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user