Bug 78310

Summary: MathML internals - use LayoutUnit
Product: WebKit Reporter: Dave Barton <dbarton>
Component: MathMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: darin, donggwan.kim, eae, eric, fred.wang, leviw
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Dave Barton
Reported 2012-02-09 18:13:55 PST
MathML internals - use LayoutUnit
Attachments
Patch (20.94 KB, patch)
2012-02-09 18:22 PST, Dave Barton
no flags
Dave Barton
Comment 1 2012-02-09 18:22:39 PST
Darin Adler
Comment 2 2012-02-09 18:39:54 PST
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.
Darin Adler
Comment 3 2012-02-09 18:40:40 PST
It’s too bad this combines the LayoutUnit with the create change, because I could review+ the create change without a second thought!
Dave Barton
Comment 4 2012-02-09 19:18:20 PST
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!
Dave Barton
Comment 5 2012-02-09 22:23:18 PST
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!
Dave Barton
Comment 6 2012-02-10 10:32:08 PST
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.
Dave Barton
Comment 7 2012-09-29 19:28:16 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.