зеркало из https://github.com/mozilla/gecko-dev.git
Bug 239962 Incorrect table layout caused by Sun compiler with -xO5
r=roland.mainz, sr=roc, a=mkaply a workaround for the Sun Forte compiler's bug.
This commit is contained in:
Родитель
aaa58ccec4
Коммит
b30731f177
|
@ -1213,6 +1213,11 @@ nsTableOuterFrame::IsAutoWidth(nsIFrame& aTableOrCaption,
|
|||
|
||||
const nsStylePosition* position = aTableOrCaption.GetStylePosition();
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
// Bug 239962, this is a workaround to avoid incorrect code generation by Sun Forte compiler.
|
||||
float percent = position->mWidth.GetPercentValue();
|
||||
#endif
|
||||
|
||||
switch (position->mWidth.GetUnit()) {
|
||||
case eStyleUnit_Auto: // specified auto width
|
||||
case eStyleUnit_Proportional: // illegal for table, so ignored
|
||||
|
@ -1221,7 +1226,11 @@ nsTableOuterFrame::IsAutoWidth(nsIFrame& aTableOrCaption,
|
|||
isAuto = PR_FALSE;
|
||||
break;
|
||||
case eStyleUnit_Percent:
|
||||
#ifdef __SUNPRO_CC
|
||||
if (percent > 0.0f) {
|
||||
#else
|
||||
if (position->mWidth.GetPercentValue() > 0.0f) {
|
||||
#endif
|
||||
isAuto = PR_FALSE;
|
||||
if (aIsPctWidth) {
|
||||
*aIsPctWidth = PR_TRUE;
|
||||
|
|
|
@ -1213,6 +1213,11 @@ nsTableOuterFrame::IsAutoWidth(nsIFrame& aTableOrCaption,
|
|||
|
||||
const nsStylePosition* position = aTableOrCaption.GetStylePosition();
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
// Bug 239962, this is a workaround to avoid incorrect code generation by Sun Forte compiler.
|
||||
float percent = position->mWidth.GetPercentValue();
|
||||
#endif
|
||||
|
||||
switch (position->mWidth.GetUnit()) {
|
||||
case eStyleUnit_Auto: // specified auto width
|
||||
case eStyleUnit_Proportional: // illegal for table, so ignored
|
||||
|
@ -1221,7 +1226,11 @@ nsTableOuterFrame::IsAutoWidth(nsIFrame& aTableOrCaption,
|
|||
isAuto = PR_FALSE;
|
||||
break;
|
||||
case eStyleUnit_Percent:
|
||||
#ifdef __SUNPRO_CC
|
||||
if (percent > 0.0f) {
|
||||
#else
|
||||
if (position->mWidth.GetPercentValue() > 0.0f) {
|
||||
#endif
|
||||
isAuto = PR_FALSE;
|
||||
if (aIsPctWidth) {
|
||||
*aIsPctWidth = PR_TRUE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче