Implement menclose notation "updiagonalarrow"

RESOLVED FIXED in mozilla24

Status

()

Core
MathML
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: fredw, Assigned: fredw)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

Trunk
mozilla24
dev-doc-complete
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

4 years ago
In order to implement the \cancelto command MathJax uses the nonstandard syntax 

    <menclose notation="updiagonalstrike" class="MJX-arrow">

and render it as an up "diagonal arrow". Unfortunately other MathML rendering engines won't draw the arrow head. I suggested to replace that by a new notation "updiagonalarrow" (the list of menclose notation is open-ended). I think it would be good to implement this notation in Gecko.

Note that MathJax will actually generate

    <menclose notation="updiagonalstrike updiagonalarrow">

for backwards compatibility with rendering engines that only support "updiagonalstrike". So Gecko should make "updiagonalarrow" override "updiagonalstrike".
(In reply to Frédéric Wang (:fredw) from comment #0)
> So Gecko should make "updiagonalarrow" override "updiagonalstrike".

If the arrow is drawn such that its shaft is the same as the strike, then no special case is required when the two occur together.  MathML notations are usually all drawn iirc.
(Assignee)

Comment 2

4 years ago
(In reply to Karl Tomlinson (:karlt) from comment #1)
> If the arrow is drawn such that its shaft is the same as the strike, then no
> special case is required when the two occur together.  MathML notations are
> usually all drawn iirc.

Yes, I agree. I think I was more thinking about how menclose is handled in MathJax. That should not be a problem in Gecko.
(Assignee)

Comment 3

4 years ago
Created attachment 756934 [details]
testcase

Here is a test case. See also attachment 389368 [details] for a dynamic version where you can select the dimensions and notations.
(Assignee)

Comment 4

4 years ago
Created attachment 756937 [details] [diff] [review]
Patch V1

https://tbpl.mozilla.org/?tree=Try&rev=4a3d43b50185
(Assignee)

Updated

4 years ago
Attachment #756937 - Flags: review?(karlt)
Comment on attachment 756937 [details] [diff] [review]
Patch V1

>+        rect.TopRight(),
>+        rect.TopRight() + gfxPoint(-w -.4*h, h - .4*w),

For a wide rect, this point may be more than e/2 above the top of rect, which can lead to parts not being invalidated correctly, on scrolling or selection, for example.
Attachment #756937 - Flags: review?(karlt) → review+
(Assignee)

Comment 6

4 years ago
Created attachment 757830 [details] [diff] [review]
Patch V2

OK, I modified the patch to limit the overflow by a maximum of e/2.

That preserves the shape of the arrow head in normal cases and that seems to be what MathJax HTML-CSS does too (but only for the y coordinates??).
Attachment #756937 - Attachment is obsolete: true
(Assignee)

Updated

4 years ago
Keywords: checkin-needed, dev-doc-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc78a3d303c8
Flags: in-testsuite+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/dc78a3d303c8
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
(Assignee)

Comment 9

4 years ago
As I indicated on the MathJax issue, this does not work very well in RTL. See also discussion on the LaTeXML mailing list:
http://lists.jacobs-university.de/pipermail/project-latexml/2013-June/001379.html
https://developer.mozilla.org/en-US/docs/Web/MathML/Element/menclose
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/24#MathML
Keywords: dev-doc-needed → dev-doc-complete
Depends on: 963198
Depends on: 963324
You need to log in before you can comment on or make changes to this bug.