[Webkit-unassigned] [Bug 81387] MathML internals - factor code for almost anonymous blocks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 16 15:16:52 PDT 2012


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





--- Comment #6 from Dave Barton <dbarton at mathscribe.com>  2012-03-16 15:16:51 PST ---
Boy you guys are good (thorough).

I'd read the technical articles, but it's good to read again. I'd also be happy to read your (Eric) new wiki documentation, and give newbie comments to you if you want.

Actually I didn't realize RenderObject isn't reference counted, so I'd originally coded using PassRefPtr<>. But none of the other functions use PassOwnPtr<> for RenderObjects, they just return a raw new pointer that ends up going to addChild(), so I did that.

Julien, soon we'll switch to an anonymous RenderBlock, I think. The best answer ultimately might be some new RenderPadded or RenderWrapped or whatever that might not even derive from RenderBlock, as we discussed. I think (though I might be proved wrong later) that these (almost) anonymous renderers that just add some padding or a vertical-align or whatever aren't specific to MathML, so shouldn't derive from RenderMathMLBlock. I only do that now to not change (almost) all the test dump tree output, to not change some broken code in RenderMathMLFraction.cpp in this patch, and so m_scripts in RenderMathMLSubSup could call this RenderMathMLBlock::createAlmostAnonymousBlock() member function (but in the end it doesn't - see below). We could make createAlmostAnonymousBlock() a member function of RenderBlock, but I didn't since this whole "almost anonymous" concept is a temporary hack just for MathML.

style()->fontSize() == row->style()->fontSize(), and the former seemed simpler and better to me with the new code.

I tried m_scripts->createAlmostAnonymousBlock() but tests failed. The problem is that the setStyle(), or some styleDidChange() or something, must happen *after* some of the style changes here (for scriptsStyle) that are more than just e.g. setting a padding. The code here seemed simplest.

Let me know if you still think I should change some of this in the next patch.

-- 
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