Closed Bug 362701 Opened 18 years ago Closed 18 years ago

[FIX]<math display="block"> does not respect floats

Categories

(Core :: MathML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: distler, Assigned: bzbarsky)

References

()

Details

(Keywords: regression, verified1.8.0.10, verified1.8.1.2)

Attachments

(5 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20061119 SeaMonkey/1.5a
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20061119 SeaMonkey/1.5a

In a nutshell, <math display="block"> is centered in its containing box, rather than making room for a float.

This appears to be a regression, as older builds took account of floats. I will attach two screenshots illustrating the old (correct) behaviour (in the release version of Camino) and the new (incorrect) behaviour (in a current nightly build of Seamonkey).

Reproducible: Always

Actual Results:  
Equation is centered in its containing box (and hence partially obscured by the float).

Expected Results:  
The float should be taken into account in determining how to center the equation.
Attached file testcase
I've no idea what's "right," but the behavior changed between 2006-09-21 20:00 and 2006-09-24 23:00, which covers The Night of MathML Checkins: bug 353897, bug 325222, bug 354090, bug 353876 and bug 353894.
This is a consequence of giving that block a space manager, so regression from bug 239919.  Perhaps it should also have -moz-float-edge set appropriately or something?  rbs, how should the rendering here work out (e.g. if there were a border on the <math>, where should it appear on this site)?
Blocks: 239919
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9?
Flags: blocking1.8.1.1?
Flags: blocking1.8.0.9?
Keywords: regression
OS: Mac OS X 10.3 → All
Hardware: Macintosh → All
At least part of the issue, of course, is that the SPACE_MGR bit affects interaction with both floats inside the box and floats outside it... :(  It'd be nice if it were possible to create ones own space manager and preinitialize it with all the rects from the ancestor's space manager or something for cases like this.
i am also seeing this on 

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a1) Gecko/20061203 Minefield/3.0a1 ID:2006120322 [cairo]
(In reply to comment #4)
> This is a consequence of giving that block a space manager, so regression from
> bug 239919. 

You probably mean a regression from bug 353894? Or bug 353894?
Er, yes.  Dunno where the other came from....
Blocks: 353894
No longer blocks: 239919
>rbs, how should the rendering here work out (e.g. if there were a
border on the <math>, where should it appear on this site?

Dunno where it "should" appear; putting a dashed purple border around <math> and and a blue border around each of the first children of <math>, you can see where it *does* appear in the modified testcase.
Will have to catch this one in the next release, missing 1.8.1.1
Flags: wanted1.8.1.x?
Flags: wanted1.8.0.x?
Flags: blocking1.8.1.1?
Flags: blocking1.8.0.9?
rbs, what do you think?
Attachment #247461 - Flags: superreview?(rbs)
Attachment #247461 - Flags: review?(rbs)
I am in the midst of a workshop -- will get home later and get back to you tomorrow with my feedback.
Comment on attachment 247461 [details] [diff] [review]
So perhaps like this?

r+sr=rbs. This is indeed the effect we want. We do always want to center the block <math> from within the space left after placing the float.
Attachment #247461 - Flags: superreview?(rbs)
Attachment #247461 - Flags: superreview+
Attachment #247461 - Flags: review?(rbs)
Attachment #247461 - Flags: review+
Assignee: rbs → bzbarsky
Priority: -- → P2
Summary: <math display="block"> does not respect floats → [FIX]<math display="block"> does not respect floats
Target Milestone: --- → mozilla1.9alpha
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment on attachment 247461 [details] [diff] [review]
So perhaps like this?

Fixes regression from earlier crash fix...
Attachment #247461 - Flags: approval1.8.1.2?
Attachment #247461 - Flags: approval1.8.0.10?
Flags: wanted1.8.1.x?
Flags: wanted1.8.0.x?
Flags: blocking1.8.1.2+
Flags: blocking1.8.0.10+
Comment on attachment 247461 [details] [diff] [review]
So perhaps like this?

approved for 1.8/1.8.0 branches, a=dveditz for drivers
Attachment #247461 - Flags: approval1.8.1.2?
Attachment #247461 - Flags: approval1.8.1.2+
Attachment #247461 - Flags: approval1.8.0.10?
Attachment #247461 - Flags: approval1.8.0.10+
Fixed for 1.8.1.2 and 1.8.0.10..

Someone who knows MathML a lot better than I would need to add a regression test for this...
Flags: blocking1.9? → in-testsuite?
Confirmed problem in Firefox 2.0.0.1 with provided testcases.

Verified correct centering in 2.0.0.2pre and 1.5.0.10pre

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/2007013007 BonEcho/2.0.0.2pre

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.10pre) Gecko/20070130 Firefox/1.5.0.10pre

The second test case does still display oddly for 1.5.0.10pre - the provided boarders don't appear to be entirely respected.  We may need to look into that and open a secondary bug.
You need to log in before you can comment on or make changes to this bug.