[webkit-dev] mfenced - more MathML questions

Alex Milowski alex at milowski.org
Tue Sep 8 16:30:59 PDT 2009

I've been doing some comprehensive testing and find that my technique
for handling fencing isn't working properly when use in nest constructs or
other situations.

Specifically, the two major problems are:

   * the fences do not scale well for large objects
   * nested fencing does not seem to be handled properly

The first problem is probably something where I'll need to special cast
certain common fencing constructors (e.g. square or curly brackets) and
draw them directly.  For example, a matrix bracketed by square brackets
will probably only look proper when I draw the brackes directly.

The problem of nested fences is much more tricky.  I thought I had a handle on
this with the only odd thing being the need to adjust the fence size after
a layout pass.  You can see this code in the patch [1] and specifically
by looking and RenderFenced.cpp in [2].

I've been able to make it behave a bit better by calling setHeight() with the
fence height online #205.  It still has trouble laying out the the open and
close fences and often overlaps the line boxes.

The real problem seems to relate to nested mfenced constructs.  A single
mfenced works but an construct like:

{ < x > }

does not work properly when the 'x' construct has an extended vertical height
(e.g. a rational function or other large fraction).  Then the nested mfenced
seems to get mixed up.  Again, it is like it is trying to constrain the fencing
into a certain box width or height, the line boxes do not fit, and then overlap

Is it possible that just setting the height doesn't help because it is a writing
direction layout/width problem?

[1] https://bugs.webkit.org/show_bug.cgi?id=28982
[2] https://bugs.webkit.org/attachment.cgi?id=39223&action=prettypatch

--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language

Bertrand Russell in a footnote of Principles of Mathematics

More information about the webkit-dev mailing list