MathML internals - use LayoutUnit
Created attachment 126423 [details] Patch
Comment on attachment 126423 [details] Patch LayoutUnit will not be changing to float. It will be changing to a fixed point fractional type. The people who need to review this are Levi and Emil, who know the rationale for when to use int and when to use LayoutUnit.
Itβs too bad this combines the LayoutUnit with the create change, because I could review+ the create change without a second thought!
Wow! I'm glad Darin caught my LayoutUnit mistake. I don't know where I thought I read that it was changing to float. Is there somewhere I can read about the proposed future LayoutUnit so I'll get this right? Thanks!
I had been relying on (misinterpreting?) WebCore/rendering/LayoutTypes.h which talked about replacing ints with floats. Obviously I won't do anything until I hear from Levi or Emil, and I don't want to conflict with bug 77916 which I've just discovered, but in the near future what should I do to program in RenderMathML* files? There's a lot of code that adds pixels constants to things, or sets them as padding widths or heights, etc. Can I use LayoutTypes.h roundedLayoutUnit(float) and ceiledLayoutUnit(float)? Are they intended to convert from pixel units to LayoutUnit? Will LayoutUnit turn into a class with an operator int() or operator float() or something that converts to pixels? If LayoutUnit becomes a fixed point type, don't we need to shift or multiply and divide when converting from and to pixel units?? Thanks for any enlightenment!
All right, I have found http://svn.webkit.org/repository/webkit/branches/subpixellayout/Source/WebCore/platform/AppUnit.h and it answers a lot of my questions. Sorry if I asked too many, I think I was tired last night.
The changes in this patch no longer really apply to the current MathML code. Most of the affected routines have been removed, and also I now understand better the preference for CSS-pixel-aligning most boxes, baselines, fraction bars, square root signs, etc.