Some unnecessarily repeated code in nsBlockFrame.cpp

RESOLVED INVALID

Status

()

Core
Layout
RESOLVED INVALID
17 years ago
17 years ago

People

(Reporter: Marc Attinasi, Assigned: Marc Attinasi)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

17 years ago
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.
(Assignee)

Comment 1

17 years ago
Created attachment 44306 [details] [diff] [review]
Proposed patch: collapse if and else blocks (since they are the same)

Comment 2

17 years ago
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.
(Assignee)

Comment 3

17 years ago
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.
(Assignee)

Comment 5

17 years ago
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.

Comment 6

17 years ago
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
Last Resolved: 17 years ago
Resolution: --- → INVALID
(Assignee)

Comment 7

17 years ago
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.