-moz-float-edge sucks; especially with auto margins and right floaters
Categories
(Core :: Layout: Floats, defect)
Tracking
()
People
(Reporter: ian, Unassigned)
References
()
Details
(Keywords: css-moz, testcase, Whiteboard: [Hixie-PF])
STEPS TO REPRODUCE 1. float something to the right. 2. immediately after it, create an in-flow box with -moz-float-edge: margin-box; margin: 1em auto; 3. lay it out. 4. shrink the width so that there is a little room left. EXPECTED RESULTS in-flow box should be centered in remaining space, and otherwise look normal (only high enough for its contents, etc.): +-----------------------------------------------------+ | | | +-------------------+ +--------------------+ | | | centered text | | right floater | | | +-------------------+ +--------------------+ | | | +-----------------------------------------------------+ ACTUAL RESULTS quite inexplicably: +-----------------------------------------------------+ | | | +-------------------+ +--------------------+ | | | | | right floater | | | | | +--------------------+ | | | centered text | | | +-------------------+ | | | +-----------------------------------------------------+ See test case.
Comment 2•24 years ago
|
||
Accepting --> Moz 1.0 Is this affecting anything important for Mozilla 0.9?
Reporter | ||
Comment 3•23 years ago
|
||
Not particularly, in fact depending on the results of the float-display thread on w3c-css-wg, this might end up WONTFIX. Definitely low priority, I would target it at moz 1.1.
Does this bug (and bug 69491) happen with 'padding-box' and 'border-box' as well or just margin box. If it's only 'margin-box' then maybe it's just nsBlockReflowState::ComputeBlockAvailSpace that needs fixing...
Reporter | ||
Comment 5•23 years ago
|
||
Yes. It happens with all but content-box. http://www.hixie.ch/tests/adhoc/css/mozilla/float-edge/009.html content (ok) http://www.hixie.ch/tests/adhoc/css/mozilla/float-edge/010.html border http://www.hixie.ch/tests/adhoc/css/mozilla/float-edge/011.html padding http://www.hixie.ch/tests/adhoc/css/mozilla/float-edge/012.html margin It seems the problem is that we position the box using the -moz-float-edge algorith (except we don't actually do it right, but whatever), but we position the text using the CS2 algorithm.
Updated•23 years ago
|
Reporter | ||
Comment 6•21 years ago
|
||
.
Updated•20 years ago
|
Updated•15 years ago
|
The test case here appears to work correctly on modern versions of Firefox, so this seems to be fixed.
We stopped using -moz-float-edge for lists in bug 413840; we now only use it for <hr>s. Maybe we could remove it at some point. It also supports only content-box and margin-box now. Not sure what fixed that particular testcase, though. We probably still want this bug open unless we have another one on getting rid of -moz-float-edge.
Updated•2 years ago
|
Comment 9•1 year ago
•
|
||
(In reply to David Baron :dbaron: from comment #8)
We stopped using -moz-float-edge for lists in bug 413840; we now only use it
for <hr>s. Maybe we could remove it at some point.
Update: our -moz-float-edge
usage for <hr>
was removed in bug 1781102, so -moz-float-edge
is now almost unused.
At this point, we only use -moz-float-edge
as part of the styles for <math>
:
https://searchfox.org/mozilla-central/rev/02ff1234547a8097df4b07a0deb70dae49ac0d03/layout/mathml/mathml.css#20,33
math {
...
-moz-float-edge: margin-box;
Maybe we could remove that as part of modernizing some of our mathml stuff, though. I know Igalia folks have done a lot of standardization work on defining how MathML behaves over the past few years, and it wouldn't surprise me if they managed to standardize it such that this is no longer necessary.
Description
•