Bug 120164

Summary: Implement negative width for mspace
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: MathMLAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, cfleizach, darin, gur.trio, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 124841    
Bug Blocks: 115583    
Description Flags
Experimental Patch none

Description Frédéric Wang (:fredw) 2013-08-22 11:04:44 PDT
Created attachment 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:

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

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.