зеркало из https://github.com/mozilla/gecko-dev.git
b=25245 Changed Reflow() to return 0 for a max-element-width if the
image has a percentage based width
This commit is contained in:
Родитель
0437b82128
Коммит
459938a056
|
@ -239,7 +239,12 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
|
|||
GetDesiredSize(aPresContext, aReflowState, aMetrics);
|
||||
AddBordersAndPadding(aPresContext, aReflowState, aMetrics, mBorderPadding);
|
||||
if (nsnull != aMetrics.maxElementSize) {
|
||||
aMetrics.maxElementSize->width = aMetrics.width;
|
||||
// If we have a percentage based width, then our maximum width is 0
|
||||
if (eStyleUnit_Percent == aReflowState.mStylePosition->mWidth.GetUnit()) {
|
||||
aMetrics.maxElementSize->width = 0;
|
||||
} else {
|
||||
aMetrics.maxElementSize->width = aMetrics.width;
|
||||
}
|
||||
aMetrics.maxElementSize->height = aMetrics.height;
|
||||
}
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
|
|
@ -239,7 +239,12 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
|
|||
GetDesiredSize(aPresContext, aReflowState, aMetrics);
|
||||
AddBordersAndPadding(aPresContext, aReflowState, aMetrics, mBorderPadding);
|
||||
if (nsnull != aMetrics.maxElementSize) {
|
||||
aMetrics.maxElementSize->width = aMetrics.width;
|
||||
// If we have a percentage based width, then our maximum width is 0
|
||||
if (eStyleUnit_Percent == aReflowState.mStylePosition->mWidth.GetUnit()) {
|
||||
aMetrics.maxElementSize->width = 0;
|
||||
} else {
|
||||
aMetrics.maxElementSize->width = aMetrics.width;
|
||||
}
|
||||
aMetrics.maxElementSize->height = aMetrics.height;
|
||||
}
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче