Closed Bug 93161 Opened 23 years ago Closed 23 years ago

Some unnecessarily repeated code in nsBlockFrame.cpp

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: attinasi, Assigned: attinasi)

Details

Attachments

(1 file)

I saw this while making another change and could not pass it up. It looks like
there used to be different handling for the BRS_NOWRAP case here, but the if and
else are now identical so I propose to collapse it.
So, buster did this in r3.384, and said ``bugs 38396, 29429, 32471, 27390, 32581
errors in incremental calcuation of max-element-size and preferred-size.''

But it really seems to me like the commented-out code oughtta go back if the
comment has anything to do with reality! ;-) IIRC we use the MES for tables and
floaters (neither is allowed to collapse below the MES), and it would seem to me
that we'd actually _want_ to use the line's xMost plus some right margin padding
mumble as the MES.

What happens if you put some nowrap text in a table cell? A floater? Do we get
it right? cc'ing hixie, who may have some thoughts.
Sheet - I've been hearing karnaze and alexsavulov groaning over nowrap in tables 
lately - maybe they could take a look-see too. I'll go back and see if I can 
flush out the nowrap consequences myself too.
Waterson, you are so money, baby. Reverting that buster-induced change seems to
help with a bunch of nowrap problems. Gotta check those bugs he claims to have
fixed now. Looks like this bug may become invalid soon, but I'm really glad you
questioned the change that I proposed we remove.
AWRIGHT! This bug is not an issue anymore!

I'm asking myself why did I trust that commented line?
Anyway...

Uncommenting the line 

       //maxWidth = aState.mKidXMost + borderPadding.right;

in  nsBlockFrame.cpp (see Mark's patch), helps to repair 80817
and also to undo the change Chris Karnaze made in the nsTableCellFrame.cpp
to repair 57828 (in SetPass1MaxElementSize), as he mentioned in the source.

Thx to everyone that helped to identify the cause.

Marking INVALID
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Looks like this is getting taken care of in bug 80817 now.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: