Closed
Bug 271990
Opened 20 years ago
Closed 20 years ago
Right floats don't line up in a shrink-to-fit abs.pos. (breaks layout of menus/tabs/buttons at www.mozilla.org)
Categories
(Core :: Layout: Positioned, defect)
Core
Layout: Positioned
Tracking
()
VERIFIED
FIXED
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
()
Details
(Keywords: regression, testcase)
Attachments
(6 files, 1 obsolete file)
723 bytes,
text/html
|
Details | |
722 bytes,
text/html
|
Details | |
1.49 KB,
text/plain
|
Details | |
1.24 KB,
patch
|
Details | Diff | Splinter Review | |
4.89 KB,
text/plain
|
Details | |
870 bytes,
patch
|
Details | Diff | Splinter Review |
Floats don't line up in a shrink-to-fit abs.pos. This is a followup from bug 201897 comment 69.
Assignee | ||
Comment 1•20 years ago
|
||
Assignee | ||
Comment 2•20 years ago
|
||
Attachment #167187 -
Attachment is obsolete: true
Assignee | ||
Comment 3•20 years ago
|
||
Before reflow: availWidth=1073741824 aContainingBlockWidth=-1 After 1st reflow: kidDesiredSize.width=560 kidDesiredSize.mMaxElementWidth=280 availWidth=14350 Before reflow: availWidth=560 aContainingBlockWidth=14350 After 2nd reflow: kidDesiredSize.width=560
Assignee | ||
Comment 4•20 years ago
|
||
float:left seems to work: Before reflow: availWidth=1073741824 aContainingBlockWidth=-1 After 1st reflow: kidDesiredSize.width=840 kidDesiredSize.mMaxElementWidth=280 availWidth=14350 Before reflow: availWidth=840 aContainingBlockWidth=14350 After 2nd reflow: kidDesiredSize.width=840
Assignee | ||
Comment 5•20 years ago
|
||
I think the reported preferred width of 560 is wrong in an unconstrained reflow. Maybe the following block has something to do with it? http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/html/base/src/nsBlockReflowContext.cpp&rev=1.124&mark=439-459#435 (mSpace.width==NS_UNCONSTRAINEDSIZE on the 1st reflow there)
Summary: Floats don't line up in a shrink-to-fit abs.pos. → Right floats don't line up in a shrink-to-fit abs.pos.
Assignee | ||
Comment 6•20 years ago
|
||
I think I have found the problem now: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/html/base/src/nsBlockReflowState.cpp&rev=3.494&mark=918,919,933-936#908
Assignee | ||
Comment 7•20 years ago
|
||
Assignee | ||
Comment 8•20 years ago
|
||
FWIW, this fixes the problem...
Isn't mAvailSpaceRect.XMost() be NS_UNCONSTRAINEDSIZE for an unconstrained reflow?
Assignee | ||
Comment 10•20 years ago
|
||
Sometimes, see attachment 167204 [details] (which is without the wallpaper).
Why was the second float ok but not the third? You should never do arithmetic on NS_UNCONSTRAINEDSIZE.
Assignee | ||
Comment 12•20 years ago
|
||
(In reply to comment #11) > Why was the second float ok but not the third? Don't know yet... > You should never do arithmetic on NS_UNCONSTRAINEDSIZE. That I do know - but it still fixes the problem ;-)
Assignee | ||
Comment 13•20 years ago
|
||
It seems the problem occurs when setting psd->mRightEdge = NS_UNCONSTRAINEDSIZE in nsLineLayout::UpdateBand(), it seems placing right floats after that isn't working...
Assignee | ||
Comment 14•20 years ago
|
||
This block may be of interest as well: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/html/base/src/nsBlockReflowState.cpp&rev=3.494&mark=1018-1033#1018
Assignee | ||
Comment 15•20 years ago
|
||
Here is another wallpaper that seems to fix the problem also... In nsLineLayout::UpdateBand() we are not really doing anything "to advance" in the case when psd->mRightEdge is set to NS_UNCONSTRAINEDSIZE. So this patch is just a wild guess... maybe there is code somewhere that reasons along the line of "hey, we tried to place a float but we didn't advance on the line so let's move to the next line" ... or something...
Assignee | ||
Comment 16•20 years ago
|
||
Comment on attachment 167224 [details] [diff] [review] wallpaper 2 Note that this triggers a CRAZY_WIDTH(xmost) check in nsBlockFrame::PostPlaceLine() though: Area(ul)(3)@0x87801fc: line=0x878f1d8 xmost=1073741824 Area(li)(3)@0x87808e0: line=0x8780a68 xmost=1073743154 ...
Comment 17•20 years ago
|
||
*** Bug 272099 has been marked as a duplicate of this bug. ***
Comment 18•20 years ago
|
||
*** Bug 272197 has been marked as a duplicate of this bug. ***
Comment 19•20 years ago
|
||
*** Bug 272601 has been marked as a duplicate of this bug. ***
Comment 20•20 years ago
|
||
*** Bug 272391 has been marked as a duplicate of this bug. ***
Comment 21•20 years ago
|
||
*** Bug 272734 has been marked as a duplicate of this bug. ***
Comment 22•20 years ago
|
||
Tweaking summary in the hope that it will reduce the number of dupes filed.
Summary: Right floats don't line up in a shrink-to-fit abs.pos. → Right floats don't line up in a shrink-to-fit abs.pos. (breaks menus at www.mozilla.org)
Comment 23•20 years ago
|
||
*** Bug 272770 has been marked as a duplicate of this bug. ***
Comment 24•20 years ago
|
||
*** Bug 272831 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 25•20 years ago
|
||
*** Bug 272887 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Flags: blocking1.8a6?
Comment 26•20 years ago
|
||
*** Bug 272909 has been marked as a duplicate of this bug. ***
Comment 27•20 years ago
|
||
*** Bug 273000 has been marked as a duplicate of this bug. ***
Comment 28•20 years ago
|
||
*** Bug 273005 has been marked as a duplicate of this bug. ***
Comment 29•20 years ago
|
||
*** Bug 273204 has been marked as a duplicate of this bug. ***
Comment 30•20 years ago
|
||
*** Bug 273219 has been marked as a duplicate of this bug. ***
Comment 31•20 years ago
|
||
*** Bug 273331 has been marked as a duplicate of this bug. ***
Comment 32•20 years ago
|
||
*** Bug 273362 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Summary: Right floats don't line up in a shrink-to-fit abs.pos. (breaks menus at www.mozilla.org) → Right floats don't line up in a shrink-to-fit abs.pos. (breaks menus/tabs at www.mozilla.org)
Comment 33•20 years ago
|
||
Tweaking the subject again along the dupes.
Summary: Right floats don't line up in a shrink-to-fit abs.pos. (breaks menus/tabs at www.mozilla.org) → Right floats don't line up in a shrink-to-fit abs.pos. (breaks layout of menus/tabs/buttons at www.mozilla.org)
Comment 34•20 years ago
|
||
This is working in the latest nightly Firefox build on Windows 2004-12-06-08-trunk The buttons on www.mozilla.org are lined up correctly.
Comment 35•20 years ago
|
||
Yes, this was fixed by the "Patch rev. 10" in bug 201897, which was checked in 2004-12-05 16:27.
Status: NEW → RESOLVED
Closed: 20 years ago
Flags: blocking1.8a6?
Resolution: --- → FIXED
Comment 37•20 years ago
|
||
*** Bug 273430 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 38•20 years ago
|
||
*** Bug 273443 has been marked as a duplicate of this bug. ***
Comment 39•20 years ago
|
||
*** Bug 273559 has been marked as a duplicate of this bug. ***
Comment 40•20 years ago
|
||
*** Bug 273629 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•