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)
Core
MathML
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: fredw, Assigned: hage.jonathan)
References
Details
Attachments
(3 files, 7 obsolete files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
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 ∑. "
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".
Reporter | ||
Updated•13 years ago
|
Whiteboard: [good second bug]
Reporter | ||
Comment 1•13 years ago
|
||
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
Assignee | ||
Comment 2•13 years ago
|
||
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #545150 -
Flags: review?(karlt)
Assignee | ||
Updated•13 years ago
|
Attachment #545151 -
Flags: review?(karlt)
Reporter | ||
Comment 4•13 years ago
|
||
> 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.
Reporter | ||
Comment 5•13 years ago
|
||
I guess this patch can not solve the problem for munder/mover without the fix for bug 668204.
Depends on: 668204
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #545150 -
Attachment is obsolete: true
Attachment #545150 -
Flags: review?(karlt)
Assignee | ||
Comment 7•13 years ago
|
||
Attachment #546470 -
Attachment is obsolete: true
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #546499 -
Attachment is obsolete: true
Reporter | ||
Comment 9•13 years ago
|
||
(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 10•13 years ago
|
||
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".
Assignee | ||
Comment 11•13 years ago
|
||
Attachment #545151 -
Attachment is obsolete: true
Attachment #545151 -
Flags: review?(karlt)
Assignee | ||
Comment 12•13 years ago
|
||
Attachment #550320 -
Attachment is obsolete: true
Assignee | ||
Comment 13•13 years ago
|
||
Attachment #546509 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Attachment #550322 -
Flags: review?(karlt)
Assignee | ||
Updated•13 years ago
|
Attachment #550324 -
Flags: review?(karlt)
Updated•13 years ago
|
Attachment #550322 -
Flags: review?(karlt) → review+
Comment 14•13 years ago
|
||
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-
Assignee | ||
Comment 15•13 years ago
|
||
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)
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → hage.jonathan
Updated•13 years ago
|
Attachment #550979 -
Flags: review?(karlt) → review+
Updated•13 years ago
|
Keywords: helpwanted
Whiteboard: [good second bug]
Reporter | ||
Updated•13 years ago
|
Keywords: checkin-needed
Updated•13 years ago
|
Keywords: checkin-needed
Comment 16•13 years ago
|
||
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.
Description
•