[Webkit-unassigned] [Bug 79274] Fix <msubsup> formatting

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 25 16:55:56 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=79274





--- Comment #21 from Julien Chaffraix <jchaffraix at webkit.org>  2012-02-25 16:55:56 PST ---
(From update of attachment 128627)
View in context: https://bugs.webkit.org/attachment.cgi?id=128627&action=review

Sorry more comment after reading some more code.

>> Source/WebCore/rendering/mathml/RenderMathMLBlock.h:84
>> +    static void checkBlockWrapper(RenderObject* wrapper);
> 
> The naming is bad. It doesn't really "check" the block.
> 
> I have no idea why you would need to recreate your style *every time* you do a layout. This is likely a hidden bug in your implementation as you really shouldn't need to.

I know now: we propagate the style change to our anonymous children in styleDidChange. I think you need to implement something similar here and call this function propagateStyleToWrappers with a FIXME saying that this should go away once your child are properly anonymous (it will be handled by propagateStyleToAnonymousChildren).

> Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp:170
> +    superscriptWrapper->style()->setPaddingBottom(Length(superPaddingBottom, Fixed));

This logic looks very familiar to RenderTableCell's intrinsic padding. This is used to add more padding to accommodate vertical-align, I wonder if this would avoid having to set a fake paddingTop just for the purpose of correctly laying out your subscript or superscript. This would need a non-trivial refactoring (you need your very own layout method to account for this padding when laying out) so it should be left for later.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list