Bug 120164 - Implement negative width for mspace
: Implement negative width for mspace
Status: NEW
: WebKit
MathML
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
: 124841
: 115583
  Show dependency treegraph
 
Reported: 2013-08-22 11:04 PST by
Modified: 2013-12-17 15:54 PST (History)


Attachments
Experimental Patch (10.81 KB, patch)
2013-08-22 11:04 PST, Frédéric Wang
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2013-08-22 11:04:44 PST
Created an attachment (id=209380) [details]
Experimental Patch

Just opening this bug for the record and attaching an old experimental patch if someone wants to work on this. IIRC, one problem with that patch is that it caused an assert to be raised in the flexbox code. I also tried a simpler version that just removed

if (m_width < 0) {
   m_width = 0;
}

and I think this gave similar results. Both methods provided the expected rendering for the added reftests. One case that is not included in the tests is negative space in table cells:

...
            <mtd>
              <mspace width="2em" height="1em" mathbackground="red"></mspace>
              <mspace width="-1em"/>
              <mspace width="1em" height="1em" mathbackground="blue"></mspace>
            </mtd>
...

that can't work because <mtd> has not a flexbox display but a table-cell display. I think the solution will be to add an anonymous flexbox as a child of the mtd element.