Summary: | Use LayoutUnit values for MathML ascent | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Frédéric Wang (:fredw) <fred.wang> | ||||||
Component: | MathML | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | distler, jfernandez | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | 161127, 161136, 180151 | ||||||||
Bug Blocks: | 132009 | ||||||||
Attachments: |
|
Description
Frédéric Wang (:fredw)
2016-03-25 03:48:29 PDT
Created attachment 274897 [details]
WIP Patch
Created attachment 274907 [details]
WIP Patch
Most of the code use LayoutUnit when calculating the firstLineBaseline but I guess it is still possible to improve that a bit. The WIP patch is probably obsolete but at least it provides an idea. I'm not exactly sure why firstLineBaseline() must return an (Optional) int for MathML (besides the fact that MathML renderer classes used to derive from flexboxes). I think we want to use LayoutUnit as much as possible. I'm making this depends on bug 161136 and bug 161127 which allow to implement firstLineBaseline() without having to store LayoutUnit members and keep them updated. In general, it seems that performing a simple computation is always better than having to use a (possible not up-to-date class member). I'm cc'int Jacques Distler as he reported an issue with the alignment of attachment 286836 [details] that I suspect is due to this bug (but I was not able to reproduce it). |