Closed
Bug 544036
(maction)
Opened 15 years ago
Closed 2 years ago
Improve/Complete implementation of maction
Categories
(Core :: MathML, defect, P5)
Core
MathML
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: fredw, Unassigned)
References
(Depends on 1 open bug, Blocks 2 open bugs, )
Details
(Keywords: helpwanted, meta)
This is a meta-bug to track the issues for <maction/>.
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".
Reporter | ||
Updated•15 years ago
|
Alias: maction
Reporter | ||
Updated•15 years ago
|
Keywords: helpwanted
Reporter | ||
Comment 1•14 years ago
|
||
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:<maction actiontype="restyle#zoom">
mathml/start-hebrew.xhtml:maction[actiontype="restyle#background"] {
mathml/start-hebrew.xhtml:maction[actiontype="restyle#zoom"] {
mathml/start-hebrew.xhtml:<maction actiontype="restyle#zoom">
mathml/start.xhtml:maction[actiontype="restyle#background"] {
mathml/start.xhtml:maction[actiontype="restyle#zoom"] {
mathml/start.xhtml:<maction actiontype="restyle#zoom">
mathml/demo/basics.xhtml: <maction id="a11" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a12" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a13" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a21" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a22" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a23" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a31" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a32" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a33" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a41" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a42" actiontype="toggle" selection="2">
mathml/demo/basics.xhtml: <maction id="a43" actiontype="toggle" selection="2">
-----------
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:
<maction actiontype="restyle#zoom">...</maction>
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
<maction actiontype="toggle" selection="i">
child0 child1 ... child(N-1)
</maction>
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:
<maction actiontype="statusline#message">
...
</maction>
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 <mtext> 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.
Comment 2•14 years ago
|
||
(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.
Reporter | ||
Updated•13 years ago
|
Blocks: mathml-in-mathjax
Reporter | ||
Comment 3•13 years ago
|
||
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.
Reporter | ||
Updated•13 years ago
|
Depends on: maction-statusline
Reporter | ||
Updated•13 years ago
|
Depends on: dynamic-maction-math
Reporter | ||
Updated•13 years ago
|
Depends on: maction-selection
Reporter | ||
Updated•12 years ago
|
Priority: -- → P5
Reporter | ||
Comment 4•2 years ago
|
||
Resolving as WONTFIX since the plan is to do bug 1588733 instead.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•