Skip to content

Incorrect widths of math elements in Gecko #558

Closed
@fred-wang

Description

@fred-wang

Follow-up of Peter's report on the dev list, there are issues with width of math elements in Gecko. MML.math has the following block:

if (nMML.widthBug && !mtable.nMMLforceWidth && mtable.nMMLlaMatch))) {
       //
       //  Convert size to ex's so that it scales properly if the print media
       //    has a different font size.
       //
      parent.style.width = (math.firstChild.scrollWidth/nMML.ex).toFixed(3) + "ex";
     }

As I read it, this will not be executed if there is not any mtable. I think we disabled the correction when we added the mlabeldtr workaround in 0891402#L5L621 (issue #356). The condition should probably be:

    nMML.widthBug && !(mtable.nMMLhasLabels && (mtable.nMMLforceWidth || !mtable.nMMLlaMatch))

But then this gives too large widths. It seems to be due to the conversion to ex which was introduced in debc240#L3L618 (issue #386)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions