Closed Bug 669713 Opened 13 years ago Closed 13 years ago

In <munderover accent=true> the scriptlevel of the over child is not incremented, even when rendered as a supscript

Categories

(Core :: MathML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: fredw, Assigned: hage.jonathan)

References

Details

Attachments

(3 files, 7 obsolete files)

Attached file testcase (deleted) —
The MathML3 spec says for munder (and similarly for mover, munderover): "It always sets displaystyle to "false" within underscript and overscript, but increments scriptlevel by 1 only when accentunder or accent, respectively, are "false". Within base, it always leaves both attributes unchanged. (see Section 3.1.6 Displaystyle and Scriptlevel). " "If base is an operator with movablelimits="true" (or an embellished operator whose mo element core has movablelimits="true"), and displaystyle="false", then underscript is drawn in a subscript position. In this case, the accentunder attribute is ignored. This is often used for limits on symbols such as &sum;. " Currently, when we are in the case of an operator with movablelimits="true" and displaystyle="false", the effect of accentunder is taken into account, for example the scriptlevel is not incremented. See the testcase. A possible fix would be to modify the calls to SetIncrementScriptLevel in TransmitAutomaticData, to force incrementing scriptlevel when movablelimits="true" and displaystyle="false".
Whiteboard: [good second bug]
The elements in the testcase should be rendered as their msup/msub/msubsup counterparts, so one can write a reftest for this bug.
Keywords: helpwanted
Attached patch Code (obsolete) (deleted) — Splinter Review
Attached patch Reftest (obsolete) (deleted) — Splinter Review
Attachment #545150 - Flags: review?(karlt)
Attachment #545151 - Flags: review?(karlt)
> PRBool subsupDisplay = > NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) > && !NS_MATHML_IS_DISPLAYSTYLE(mPresentationData.flags); The operator && should be placed at the end of a line, not the beginning. subsupDisplay could be defined just before the if statement above and used in that statement.
I guess this patch can not solve the problem for munder/mover without the fix for bug 668204.
Depends on: 668204
Attached patch Code V2 (obsolete) (deleted) — Splinter Review
Attachment #545150 - Attachment is obsolete: true
Attachment #545150 - Flags: review?(karlt)
Attached patch Code V3 (obsolete) (deleted) — Splinter Review
Attachment #546470 - Attachment is obsolete: true
Attached patch Code V4 (obsolete) (deleted) — Splinter Review
Attachment #546499 - Attachment is obsolete: true
(In reply to comment #8) > Created attachment 546509 [details] [diff] [review] [review] > Code V4 FYI, this patch misses a mercurial header with commit message.
Comment on attachment 545151 [details] [diff] [review] Reftest I wonder whether these <math> elements should have an explicit displaystyle="false" attribute as the test depends on this and "When the display attribute is missing, a rendering agent is free to initialize as appropriate to the context." Hopefully we'll add further scriplevel tests, so the test file name should include a number. It would also be helpful to indicate that this is a moveablelimits test, so perhaps "scriptlevel-moveablelimits-1.html".
Attached patch Reftests v2 (obsolete) (deleted) — Splinter Review
Attachment #545151 - Attachment is obsolete: true
Attachment #545151 - Flags: review?(karlt)
Attached patch Reftests v2 (deleted) — Splinter Review
Attachment #550320 - Attachment is obsolete: true
Attached patch Code v4 (obsolete) (deleted) — Splinter Review
Attachment #546509 - Attachment is obsolete: true
Attachment #550322 - Flags: review?(karlt)
Attachment #550324 - Flags: review?(karlt)
Attachment #550322 - Flags: review?(karlt) → review+
Comment on attachment 550324 [details] [diff] [review] Code v4 > /* The REC says: > Within underscript, <munderover> always sets displaystyle to "false", > but increments scriptlevel by 1 only when accentunder is "false". >@@ -283,28 +287,28 @@ XXX The winner is the outermost setting > that math accents and \overline change uncramped styles to their > cramped counterparts. > */ > if (tag == nsGkAtoms::mover_ || > tag == nsGkAtoms::munderover_) { > PRUint32 compress = NS_MATHML_EMBELLISH_IS_ACCENTOVER(mEmbellishData.flags) > ? NS_MATHML_COMPRESSED : 0; > SetIncrementScriptLevel(tag == nsGkAtoms::mover_ ? 1 : 2, >- !NS_MATHML_EMBELLISH_IS_ACCENTOVER(mEmbellishData.flags)); >+ !NS_MATHML_EMBELLISH_IS_ACCENTOVER(mEmbellishData.flags || subsupDisplay)); The logic here is not right. subsupDisplay is boolean while flags is a bitmask. It would probably be tidiest to add an "increment" boolean variable so the logic doesn't need to be duplicated. Can you update the "REC says" comment to describe what the new logic supports, please?
Attachment #550324 - Flags: review?(karlt) → review-
Attached patch Code v5 (deleted) — Splinter Review
The logic is not duplicated, we have one hand accentover and the other hand accentunder. I updated the "REC says" but I'm not sure if it's what you want.
Attachment #550324 - Attachment is obsolete: true
Attachment #550979 - Flags: review?(karlt)
Assignee: nobody → hage.jonathan
Attachment #550979 - Flags: review?(karlt) → review+
Keywords: helpwanted
Whiteboard: [good second bug]
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/7e6ca29cfa7c In the future, could you please provide a commit message that include bug number, description of what the patch does, and reviewer?
Flags: in-testsuite+
Target Milestone: --- → mozilla8
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: