Closed
Bug 1011237
Opened 11 years ago
Closed 10 years ago
Explicit displaystyle="true" on root <math> element is not inherited
Categories
(Tech Evangelism Graveyard :: English Other, defect)
Tech Evangelism Graveyard
English Other
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: paulmasson, Unassigned)
References
Details
(Keywords: dev-doc-complete, regression, site-compat)
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140506152807
Steps to reproduce:
The attribute "displaystyle" of the root <math> element is set explicitly to "true".
Actual results:
As of version 29.0.1 this attribute is not inherited by <mtable> elements. Presumably it is not inherited by other elements as well but this has not yet been noticed.
Expected results:
This attribute is expected to be inherited by children. Rolling back to version 28, it is inherited as expected. I am aware that there is a "display" attribute for the root <math> element that can handle inheritance, and if this is the preferred method of setting "displaystyle" then please state that in the comments. Otherwise the inheritance issue needs to be addressed.
Updated•11 years ago
|
Comment 1•11 years ago
|
||
The table of attributes in
http://www.w3.org/TR/MathML/chapter3.html#presm.mtable
says that the default value of the displaystyle attribute on mtable is "false". A paragraph a bit below says
"The displaystyle attribute is allowed on the mtable element to set the inherited value of the attribute. If the attribute is not present, the mtable element sets displaystyle to "false" within the table elements."
So you need to explicitly use a displaystyle="true" attribute on the mtable element.
Reporter | ||
Comment 2•11 years ago
|
||
In version 28.0, setting either display="block" or displaystyle="true" on the <math> element is inherited by tables, and they appear as they should without an explicit displaystyle="true" on <mtable>. Before I edit numerous files, I would like you to confirm that this inheritance will no longer be supported in current and future versions of Firefox. Thanks much!
Comment 3•11 years ago
|
||
(In reply to Frédéric Wang (:fredw) from comment #1)
> The table of attributes in
>
> http://www.w3.org/TR/MathML/chapter3.html#presm.mtable
>
> says that the default value of the displaystyle attribute on mtable is
> "false". A paragraph a bit below says
>
> "The displaystyle attribute is allowed on the mtable element to set the
> inherited value of the attribute. If the attribute is not present, the
> mtable element sets displaystyle to "false" within the table elements."
I agree with Frédéric's interpretation, even though http://www.w3.org/TR/MathML3/chapter3.html#presm.mstyle may be misleading:
"Some attributes, such as displaystyle or scriptlevel (explained below), are inherited from the surrounding context when they are not explicitly set."
The description of the behaviour on mtable in more specific and clear that the default behavior is to set displaystyle to "false", like script, mfrac and mroot elements.
Updated•11 years ago
|
Keywords: dev-doc-needed,
site-compat
Comment 4•11 years ago
|
||
(In reply to Paul Masson from comment #2)
> In version 28.0, setting either display="block" or displaystyle="true" on
> the <math> element is inherited by tables, and they appear as they should
> without an explicit displaystyle="true" on <mtable>. Before I edit numerous
> files, I would like you to confirm that this inheritance will no longer be
> supported in current and future versions of Firefox. Thanks much!
That was probably a bug in older versions. In current and future versions, we will certainly continue to follow the MathML standard, which means defaulting displaystyle to false on mtable. Currently, we map displaystyle attribute to a private -moz-math-display CSS property that is not accessible to Web authors. If this property is exposed/standardized, one could just use mtable { -moz-math-display: inherit; } to preserve the old behavior. But at the moment there are no plans for that, so you'll have to add explicit displaystyle attributes everywhere...
http://mxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css#305
Reporter | ||
Comment 5•11 years ago
|
||
What about nested tables? Will the attribute displaystyle count as present if it is set on a parent <mtable>, or will it need to be set explicitly on every <mtable>? And if <mtable> is allowed to inherit from a parent <mtable>, why not from any other parent?
Comment 6•11 years ago
|
||
Added to the site compat doc, tracker, tweet:
https://developer.mozilla.org/en-US/Firefox/Releases/29/Site_Compatibility#MathML
https://docs.google.com/spreadsheets/d/1048AVpvbP3O2atsV3i--xLpHCr4PR7TGXyFtgMrvt6Q
https://twitter.com/FxSiteCompat/status/467426164571926528
Assignee: nobody → english-other
Blocks: 838506
Component: MathML → English Other
OS: Windows 8.1 → All
Product: Core → Tech Evangelism
Hardware: x86_64 → All
Version: 29 Branch → unspecified
Comment 7•10 years ago
|
||
(In reply to Paul Masson from comment #5)
> What about nested tables? Will the attribute displaystyle count as present
> if it is set on a parent <mtable>, or will it need to be set explicitly on
> every <mtable>? And if <mtable> is allowed to inherit from a parent
> <mtable>, why not from any other parent?
What happens is like if the user-agent stylesheet had a rule
mtable {
color: red;
}
you could do <mtable style="color: blue"> but the color will always be reset on descendant mtables.
I think it's best to ask the Math WG, as it's probably a problem with the spec.
http://lists.w3.org/Archives/Public/www-math/2014Jun/att-0001/displaystyle-mtable.html
Reporter | ||
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•