Bug 544036 - (maction) Improve/Complete implementation of maction
 (maction) Summary: Improve/Complete implementation of maction
 Status: NEW helpwanted, meta Core Components MathML (show other bugs) Trunk All All P5 normal with 3 votes (vote) --- Nobody; OK to take it and work on it 433774 544001 398505 523037 523045 657279 678708 706406 maction-statusline dynamic-maction-math maction-selection 745535 748779 749044 mathml-2 mathml-in-mathjax 755525 Show dependency tree / graph

Reported: 2010-02-03 10:24 PST by Frédéric Wang (:fredw)
Modified: 2012-12-01 13:31 PST (History)
6 users (show)
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Attachments

 Frédéric Wang (:fredw) 2010-02-03 10:24:06 PST This is a meta-bug to track the issues for . MathML suggests actions toggle, statusline, tooltip and input. According to the source code, work is done for actions toggle, statusline and an extra action "restyle". Frédéric Wang (:fredw) 2011-04-22 03:48:40 PDT More thoughts on maction... First, here are the places where it is used in our MathML demo pages: fred@debian:~/mozilla\$ find mathml -name *html | xargs grep actiontype mathml/start-thai.xhtml:maction[actiontype="restyle#background"] { mathml/start-thai.xhtml:maction[actiontype="restyle#zoom"] { mathml/start-thai.xhtml: mathml/start-hebrew.xhtml:maction[actiontype="restyle#background"] { mathml/start-hebrew.xhtml:maction[actiontype="restyle#zoom"] { mathml/start-hebrew.xhtml: mathml/start.xhtml:maction[actiontype="restyle#background"] { mathml/start.xhtml:maction[actiontype="restyle#zoom"] { mathml/start.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: mathml/demo/basics.xhtml: ----------- The "restyle" actiontype is used on the start pages. It is a nonstandard attribute and I'm not sure it is really used on the Web (and it is even not documented in our pages). Its implementation is not really clean (see bug 398505) and confusing for the users, since it is contrary to the usual CSS/DOM rules. I suggest to remove it. Here is how it works: The user defines a CSS rule: maction[actiontype="restyle#zoom"] { font-size: 40pt; } and sets the corresponding attribute value on a maction element: ... At this point, one would expect the maction to be styled with "font-size: 40pt;". However, the actiontype attribute is removed from the DOM tree in nsMathMLmactionFrame.cpp and it's only when we click on the maction element that this attribute is set back and the style applied. If we click on the maction again, the actiontype attribute is removed, and we come back to the initial style. ----------- The "toggle" actiontype is also used in our demos. Bugs have been reported in the past, so I guess it has been used by some people. The idea is to have child0 child1 ... child(N-1) At the beginning the (i-1)-th child is selected and each time one clicks on the maction element, the next child is selected (modulo N). ----------- The "statusline" actiontype works like this: ... when the mouse passes over the maction element, the message is displayed in the statusline. Note however that our implementation is not the one recommended in the MathML REC (the message should be a given as the second child of the maction). Hence, we should probably modify this to follow the REC. ----------- The "tooltip" actiontype is not implemented. This feature has been asked in bug 544001 and I believe on the MathML mailing list too. Also, I've seen recently someone asking how to do a tooltip on the MathJax mailing list. The behavior is similar to "statusline", except that the message is displayed as a tooltip. I think we should implement it, probably using the work of the "title" attribute. Karl Tomlinson (:karlt) 2011-04-24 21:48:45 PDT (In reply to comment #1) > It is a nonstandard > attribute and I'm not sure it is really used on the Web (and it is even not > documented in our pages). Its implementation is not really clean (see bug > 398505) and confusing for the users, since it is contrary to the usual CSS/DOM > rules. I suggest to remove it. I suspect many maction use cases could be implemented with javascript, and so are not necessary in a web browser situation. I guess there's an argument for MathML situations with no script, and so we should support actiontypes required by the rec. For nonstandard actiontypes, this argument does not apply and so there is no good reason to implement (or continue to support) them. Frédéric Wang (:fredw) 2012-02-23 06:47:16 PST If I understand the spec correctly, the "selection" attribute only applies to the toggle actiontype. So it seems to me that in all other cases, nsMathMLmactionFrame::GetSelectedFrame() should return 1.

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