Bug 78310 - MathML internals - use LayoutUnit
Summary: MathML internals - use LayoutUnit
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 18:13 PST by Dave Barton
Modified: 2012-09-29 19:28 PDT (History)
6 users (show)

See Also:


Attachments
Patch (20.94 KB, patch)
2012-02-09 18:22 PST, Dave Barton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Barton 2012-02-09 18:13:55 PST
MathML internals - use LayoutUnit
Comment 1 Dave Barton 2012-02-09 18:22:39 PST
Created attachment 126423 [details]
Patch
Comment 2 Darin Adler 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.
Comment 3 Darin Adler 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!
Comment 4 Dave Barton 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!
Comment 5 Dave Barton 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!
Comment 6 Dave Barton 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.
Comment 7 Dave Barton 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.