Last Comment Bug 362701 - [FIX]<math display="block"> does not respect floats
: [FIX]<math display="block"> does not respect floats
Status: RESOLVED FIXED
: regression, verified1.8.0.10, verified1.8.1.2
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: mozilla1.9alpha1
Assigned To: Boris Zbarsky [:bz] (still a bit busy)
: Hixie (not reading bugmail)
: Anthony Jones (:kentuckyfriedtakahe, :k17e)
Mentors:
http://golem.ph.utexas.edu/~distler/b...
Depends on:
Blocks: 353894
  Show dependency treegraph
 
Reported: 2006-12-03 22:22 PST by distler
Modified: 2007-01-30 16:49 PST (History)
9 users (show)
dveditz: blocking1.8.1.2+
dveditz: blocking1.8.0.10+
bzbarsky: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Correct behaviour (screenshot from Camino) (107.54 KB, image/png)
2006-12-03 22:24 PST, distler
no flags Details
Incorrect behaviour (screenshot from Seamonkey nightly) (116.29 KB, image/png)
2006-12-03 22:25 PST, distler
no flags Details
testcase (962 bytes, application/xhtml+xml)
2006-12-03 23:18 PST, Phil Ringnalda (:philor)
no flags Details
testcase (more borders added) (1.07 KB, application/xml)
2006-12-04 09:40 PST, distler
no flags Details
So perhaps like this? (809 bytes, patch)
2006-12-04 12:47 PST, Boris Zbarsky [:bz] (still a bit busy)
rbs: review+
rbs: superreview+
dveditz: approval1.8.1.2+
dveditz: approval1.8.0.10+
Details | Diff | Splinter Review

Description distler 2006-12-03 22:22:09 PST
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.
Comment 1 distler 2006-12-03 22:24:15 PST
Created attachment 247386 [details]
Correct behaviour (screenshot from Camino)
Comment 2 distler 2006-12-03 22:25:48 PST
Created attachment 247387 [details]
Incorrect behaviour (screenshot from Seamonkey nightly)
Comment 3 Phil Ringnalda (:philor) 2006-12-03 23:18:26 PST
Created attachment 247389 [details]
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.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2006-12-03 23:25:38 PST
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)?
Comment 5 Boris Zbarsky [:bz] (still a bit busy) 2006-12-03 23:27:41 PST
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.
Comment 6 -fullmetaljacket- 2006-12-03 23:31:28 PST
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]
Comment 7 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-12-04 00:34:01 PST
(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?
Comment 8 Boris Zbarsky [:bz] (still a bit busy) 2006-12-04 03:22:22 PST
Er, yes.  Dunno where the other came from....
Comment 9 distler 2006-12-04 09:40:26 PST
Created attachment 247431 [details]
testcase (more borders added)

>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.
Comment 10 Daniel Veditz [:dveditz] 2006-12-04 10:39:06 PST
Will have to catch this one in the next release, missing 1.8.1.1
Comment 11 Boris Zbarsky [:bz] (still a bit busy) 2006-12-04 12:47:26 PST
Created attachment 247461 [details] [diff] [review]
So perhaps like this?

rbs, what do you think?
Comment 12 rbs 2006-12-04 13:49:07 PST
I am in the midst of a workshop -- will get home later and get back to you tomorrow with my feedback.
Comment 13 rbs 2006-12-05 12:50:34 PST
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.
Comment 14 Boris Zbarsky [:bz] (still a bit busy) 2006-12-05 14:28:30 PST
Fixed on trunk.
Comment 15 Boris Zbarsky [:bz] (still a bit busy) 2006-12-05 14:28:54 PST
Comment on attachment 247461 [details] [diff] [review]
So perhaps like this?

Fixes regression from earlier crash fix...
Comment 16 Daniel Veditz [:dveditz] 2006-12-18 14:47:30 PST
Comment on attachment 247461 [details] [diff] [review]
So perhaps like this?

approved for 1.8/1.8.0 branches, a=dveditz for drivers
Comment 17 Boris Zbarsky [:bz] (still a bit busy) 2006-12-18 20:37:52 PST
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...
Comment 18 alice nodelman [:alice] [:anode] 2007-01-30 16:49:05 PST
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.

Note You need to log in before you can comment on or make changes to this bug.