Summary: | Change to Vertical Alignment of MathML Constructs to Use the Baseline | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Milowski <alex> | ||||
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac (Intel) | ||||||
OS: | OS X 10.6 | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 3251 | ||||||
Attachments: |
|
Comment on attachment 59371 [details]
Patch to change to baseline alignment.
LGTM.
165 int heightDiff = (m_scripts->offsetHeight() - maxHeight) / 2;
166 if (heightDiff < 0)
167 heightDiff = 0;
maybe add a comment to when this can happen?
Comment on attachment 59371 [details]
Patch to change to baseline alignment.
LGTM.
165 int heightDiff = (m_scripts->offsetHeight() - maxHeight) / 2;
166 if (heightDiff < 0)
167 heightDiff = 0;
maybe add a comment to when this can happen?
WebCore/mathml/RenderMathMLUnderOver.cpp:255
+ baseline += static_cast<int>((zoomFactor > 1.25 ? 2 : 3) * zoomFactor);
ieck :-) good that you added a FIXME at least.
(In reply to comment #1) > (From update of attachment 59371 [details]) > LGTM. > > 165 int heightDiff = (m_scripts->offsetHeight() - maxHeight) / 2; > 166 if (heightDiff < 0) > 167 heightDiff = 0; > > maybe add a comment to when this can happen? Only if the base is bigger than the scripts. That shouldn't happen unless you are in the process of row height calculation. I should add a comment to that effect. (In reply to comment #2) > (From update of attachment 59371 [details]) > LGTM. > > 165 int heightDiff = (m_scripts->offsetHeight() - maxHeight) / 2; > 166 if (heightDiff < 0) > 167 heightDiff = 0; > > maybe add a comment to when this can happen? > > WebCore/mathml/RenderMathMLUnderOver.cpp:255 > + baseline += static_cast<int>((zoomFactor > 1.25 ? 2 : 3) * zoomFactor); > ieck :-) good that you added a FIXME at least. There is some padding or margin that is expanding and I can't quite figure it out. Very icky indeed. Comment on attachment 59371 [details] Patch to change to baseline alignment. Clearing flags on attachment: 59371 Committed r61861: <http://trac.webkit.org/changeset/61861> All reviewed patches have been landed. Closing bug. |
Created attachment 59371 [details] Patch to change to baseline alignment. This patch changes the way all MathML elements are rendered so the align against a calculated baseline. This fixes a number of layout bugs and cleans up the implementation. The patch is large because all the tests had to have their results reset. The actual code changes are relatively small.