the <math/> element does not support the displaystyle attribute

RESOLVED FIXED in mozilla8

Status

()

Core
MathML
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: fredw, Assigned: Jonathan Hage)

Tracking

({dev-doc-complete})

Trunk
mozilla8
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [good first bug])

Attachments

(2 attachments, 3 obsolete attachments)

(Reporter)

Description

6 years ago
In bug 569124, we allowed the <math/> element to behave as a <mstyle/>. The displaystyle attribute, handled in the nsMathMLmstyleFrame, was however not taken into account in this change.

A possible fix: in nsMathMLFrame::GetPresentationDataFrom, after setting aPresentationData.flags according to display->mDisplay, we can add a call to nsMathMLFrame::FindAttrDisplaystyle, so that we will look to a possible displaystyle attribute on the <math/> element.

See the testcase, which can easily be converted into a == reftest.
(Reporter)

Comment 1

6 years ago
I forgot to attach a testcase. The idea was simply to compare

<math displaystyle="true">
  ...
</math>

and

<math>
  <mstyle displaystyle="true">
    ...
  </mstyle>
</math>

where ... are elements rendered differently in displaystyle = true/false
(Assignee)

Comment 2

6 years ago
Created attachment 544790 [details] [diff] [review]
Patch
(Assignee)

Comment 3

6 years ago
Created attachment 544791 [details] [diff] [review]
Reftests
(Assignee)

Comment 4

6 years ago
Created attachment 544797 [details] [diff] [review]
Reftests
Attachment #544791 - Attachment is obsolete: true
(Assignee)

Updated

6 years ago
Attachment #544790 - Flags: review?(roc)
(Assignee)

Updated

6 years ago
Attachment #544797 - Flags: review?(roc)
Comment on attachment 544790 [details] [diff] [review]
Patch

Review of attachment 544790 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #544790 - Flags: review?(roc) → review+
Comment on attachment 544797 [details] [diff] [review]
Reftests

Review of attachment 544797 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #544797 - Flags: review?(roc) → review+
(Reporter)

Updated

6 years ago
Keywords: checkin-needed

Updated

6 years ago
Assignee: nobody → hage.jonathan

Updated

6 years ago
Keywords: helpwanted
(Reporter)

Updated

6 years ago
Status: NEW → ASSIGNED
http://hg.mozilla.org/mozilla-central/rev/5d92749612cc
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
backed out for crashtest failures: http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1310221738.1310222230.5384.gz&fulltext=1
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

6 years ago
Target Milestone: mozilla8 → ---
(Reporter)

Comment 9

6 years ago
We need to update nsMathMLFrame::FindAttrDisplaystyle, now that <math/> is allowed to have the displaystyle attribute:

http://mxr.mozilla.org/mozilla-central/source/layout/mathml/nsMathMLFrame.cpp#65
(Assignee)

Comment 10

6 years ago
Created attachment 545130 [details] [diff] [review]
Patch
Attachment #544790 - Attachment is obsolete: true
(Assignee)

Comment 11

6 years ago
Created attachment 545131 [details] [diff] [review]
Code
Attachment #545130 - Attachment is obsolete: true
(Reporter)

Comment 12

6 years ago
(In reply to comment #11)
> Created attachment 545131 [details] [diff] [review] [review]
> Code

I ran the crashtests with a debug build. The only failing test I have is

parser/htmlparser/tests/crashtests/445171-1.html

but that does not seem related to this patch.
(Reporter)

Updated

6 years ago
Keywords: checkin-needed

Comment 13

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/91740322b888
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/91740322b888
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Keywords: dev-doc-needed
Updated docs:
https://developer.mozilla.org/en/Firefox_8_for_developers#MathML
https://developer.mozilla.org/en/MathML/Element/math#Gecko-specific_notes
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.