This is bug 156536 for the mpadded element.
Created attachment 283313 [details]
Note: This patch required bug 156792 to be fixed. Also, I wrote it on top of bug 159619 so it will still not apply to trunk of repo for now.
Created attachment 283418 [details]
Comment on attachment 283418 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=283418&action=review
Looks like a good refactoring. Feel free to land if there are no regressions.
> - return createRenderer<RenderMathMLPadded>(*this, WTFMove(style));
> + // FIXME: Negative width values are not supported yet.
Is there a Bugzilla for this? If so, can you please note what it is here?
> + if (height < 0)
Do we have a similar (to width) expectation to support negative height/depth/lspace in the future?
(In reply to comment #4)
> > Source/WebCore/rendering/mathml/RenderMathMLPadded.cpp:47
> > + // FIXME: Negative width values are not supported yet.
> Is there a Bugzilla for this? If so, can you please note what it is here?
> > Source/WebCore/rendering/mathml/RenderMathMLPadded.cpp:60
> > + if (height < 0)
> Do we have a similar (to width) expectation to support negative
> height/depth/lspace in the future?
OK, just checked the spec and actually we miss negative lspace (not width/height/depth).
"Note that since a leading minus sign indicates a decrement, the size attributes (height, depth, width) cannot be set directly to negative values. In addition, specifying a decrement that would produce a net negative value for these attributes has the same effect as setting the attribute to zero. In other words, the effective bounding box of an mpadded element always has non-negative dimensions. However, negative values are allowed for the relative positioning attributes lspace and voffset."
I'll move this discussion to bug 85730.
Committed r203150: <http://trac.webkit.org/changeset/203150>