Closed Bug 552044 (mathcolor-background) Opened 14 years ago Closed 14 years ago

[MathML 3] Add support for mathcolor/mathbackground on any presentation MathML element

Categories

(Core :: MathML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: fredw, Assigned: fredw)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

In MathML 2, mathcolor/mathbackground were valid on most token elements and <mstyle/>:

http://www.w3.org/TR/MathML2/chapter3.html#presm.commatt

In MathML 3, they are now valid on all presentation MathML elements:

http://www.w3.org/TR/MathML3/chapter3.html#presm.presatt

The MathML 3 testsuite includes several new tests for mathcolor and mathbackground:

http://www.w3.org/Math/testsuite/build/mathml3/overview.html
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → fred.wang
Status: NEW → ASSIGNED
Attachment #436279 - Flags: review?(karlt)
Attachment #436279 - Flags: review?(karlt) → review+
Keywords: checkin-needed
Alias: mathcolor-background
I landed this but backed it out due to failure of layout/reftests/bugs/393760-1.xml.

Some differences were expected changes in behavior, but iiuc <math> is not a presentation element and so the attributes should not have an effect there.
Keywords: checkin-needed
Some other strange issues only on the Linux reftests:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1271823646.1271828181.15405.gz

REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/bugs/393760-1.xml |
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathcolor-1.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathcolor-2.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathcolor-3.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathcolor-4.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathbackground-1.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathbackground-2.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathbackground-3.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/mathml/mathbackground-4.mml | timed out waiting for onload to fire
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-linux-debug-unittest-reftest/build/reftest/tests/layout/reftests/selection/pseudo-element-of-native-anonymous.html | (!=)
PROCESS-CRASH | automation.py | application crashed (minidump found)
Thread 1 (crashed)
PROCESS-CRASH | automation.py | application crashed (minidump found)
Thread 1 (crashed)
TEST-UNEXPECTED-FAIL | automationutils.processLeakLog() | leaked 786043 bytes during test execution

Don't know what's up there, but I might use the tryserver on the next patch.
I'm going to ask the Math WG for these attributes on the <math/> element (as well as <semantics/>.

For the strange errors, I suspect this is because the reftests need bug 152001 and bug 124709 to work.
> For the strange errors, I suspect this is because the reftests need bug 152001
> and bug 124709 to work.

There is a reftest for the support of application/mathml+xml but not for the extension *.mml (the system may map the extension to another mime type). I'll try to use *.xml file instead for the next patch.
Hmm.  My Gentoo machine has text/mathml mml in /etc/mime.types.
Though Firefox seems to be getting the mime type from a different system database.
(In reply to comment #7)
> Hmm.  My Gentoo machine has text/mathml mml in /etc/mime.types.
> Though Firefox seems to be getting the mime type from a different system
> database.

Same for me. Actually if I remember well, the patch for 152001 didn't change anything: once bug 124709 was fixed, my system was able to open *.mml file. I don't know how the system determine the MIME type, but according to Boris *.mml may be mapped to another one.
So finally, does the patch do the correct thing with mathcolor/mathbackground?
I simply need to modify layout/reftests/bugs/393760-1.xml and change extensions .mml, right?
Yes, I think so.

The draft has been modified so that the section for <mstyle> includes:
"As a presentation element, mstyle directly accepts the mathcolor and mathbackground  attributes. Thus, the mathbackground specifies the color to fill the bounding box of the mstyle element itself; it does not  specify the default background color. This is an incompatible change from MathML 2, but we feel it is more useful and intuitive. Since the default for mathcolor  is inherited, this is no change in its behaviour."

and the section for <math> includes:
"Also, it accepts the mathbackground attribute in the same sense as mstyle and other presentation elements to set the background color of the bounding box, rather than specifying a default for the attribute."
Attached patch Patch v.2 (obsolete) — Splinter Review
Attachment #436279 - Attachment is obsolete: true
Attachment #443718 - Flags: review?(karlt)
Attachment #443718 - Flags: review?(karlt) → review+
Attached patch Patch v.3Splinter Review
Update the patch to fix conflicts.

The errors above are no longer present in the results of the TryServer.
I've some new errors, but I'm not sure it is related to my patch since they seem already present in previous tryserver builds:

http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1273675112.1273689466.9393.gz
Attachment #443718 - Attachment is obsolete: true
Yes, those new errors look unrelated.
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/5f53a3240101
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: