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)

defect
Not set
normal

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.
Component: Untriaged → MathML
Product: Firefox → Core
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.
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!
(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.
(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
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?
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
(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
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.