Closed
Bug 667576
Opened 13 years ago
Closed 13 years ago
linked MathML formulas fail to correctly display visited and unvisited colors
Categories
(Core :: MathML, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: cop3252, Assigned: bzbarsky)
Details
Attachments
(2 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:7.0a1) Gecko/20110627 Firefox/7.0a1
Build ID: 20110627030739
Steps to reproduce:
Visit
https://eyeasme.com/Joe/MathML/MathML_text_decoration_bug
click on a formula to see the code that generated it then, return to original page to see that the formulas are only partially correctly colored between "visited" and "unvisited" link colors
Actual results:
Linked MathML formulas do not correctly show "visited" and "unvisited" colors.
Expected results:
Linked MathML formulas should display correct colors when visited.
The MathML formulas are all hyper-linked and have been visited.
Notice how the formulas are displayed with a combination of the visited and unvisited colors.
The image was made with Nightly build 7.0a1 (2011-06-27)
Comment 2•13 years ago
|
||
The problem seems to happens with <mo> and other graphical components (such as the frac bar).
Status: UNCONFIRMED → NEW
Component: General → MathML
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → mathml
Assignee | ||
Comment 3•13 years ago
|
||
Fred, are there cases in which MathML manually resolves style contexts for <mo> and the like? If so, where is that code?
Comment 4•13 years ago
|
||
I think it is in layout/mathml/nsMathMLmoFrame.cpp, nsMathMLmoFrame::GetAdditionalStyleContext
There is a particularity of <mo>'s: they are sometimes stretchy characters and so use a specific drawing module in layout/mathml/nsMathMLChar.cpp. This can explain why they are rendered differently.
Assignee | ||
Comment 5•13 years ago
|
||
OK. So we're talking about nsMathMLFrame::ResolveMathMLCharStyle here, right?
Assignee | ||
Comment 6•13 years ago
|
||
OK, I have a fix; just need to write some tests.
Assignee: nobody → bzbarsky
Priority: -- → P2
Assignee | ||
Comment 7•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Whiteboard: [need review]
Comment 8•13 years ago
|
||
Great. Does it fix the style issue only for nsMathMLChars? Or does it also work for the graphical components of mfrac, menclose, radicals etc?
Comment 9•13 years ago
|
||
(In reply to comment #8)
> Great. Does it fix the style issue only for nsMathMLChars? Or does it also
> work for the graphical components of mfrac, menclose, radicals etc?
OK, the patch you just posted seems to indicate it does take graphical component into account.
Assignee | ||
Comment 10•13 years ago
|
||
I think I got everything. I believe the test in the patch tests chars, mfrac, and radicals. I believe the test does NOT test menclose because I had no idea how to test it. Suggestions on what Mathml would exercise that welcome.
Assignee | ||
Updated•13 years ago
|
Attachment #542862 -
Attachment description: dbaron → Fix
Attachment #542862 -
Flags: review?(dbaron)
Comment 11•13 years ago
|
||
You can replace the <msrqt> by
<menclose notation="radical circle roundedbox updiagonalstrike downdiagonalstrike">
Also you should now be able to use <math href=""> instead of a <a> element.
mode="display" is deprecated, you may use display="block" instead.
http://www.w3.org/TR/MathML/chapter2.html#interf.toplevel
Comment 12•13 years ago
|
||
A <mfrac bevelled="true"> should also enable you to test the nsDisplayMathMLSlash.
Assignee | ||
Comment 13•13 years ago
|
||
> <menclose notation="radical circle roundedbox updiagonalstrike
> downdiagonalstrike">
Did that in the denominator.
> Also you should now be able to use <math href=""> instead of a <a> element.
Done.
> mode="display" is deprecated, you may use display="block" instead.
Done.
> A <mfrac bevelled="true"> should also enable you to test the
> nsDisplayMathMLSlash.
Added.
Assignee | ||
Comment 14•13 years ago
|
||
Attachment #542871 -
Flags: review?(fred.wang)
Attachment #542871 -
Flags: review?(dbaron)
Assignee | ||
Updated•13 years ago
|
Attachment #542862 -
Attachment is obsolete: true
Attachment #542862 -
Flags: review?(dbaron)
Updated•13 years ago
|
Attachment #542871 -
Flags: review?(fred.wang) → review+
Comment 15•13 years ago
|
||
BTW, we have a similar problem in bug 487587, where the <mo>'s use specific code to determined whether they are selected in nsMathMLmoFrame::IsFrameInSelection. However that code does not seem correct because it always claims that the frame is not selected. I've tried to write a patch removing the code involved, but in that case the <mo>'s are sometimes displayed selected whereas they are not. I would appreciate if some Gecko peers could indicate what is the correct way to determine that an mo frame is selected.
Comment 16•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #14)
> Created attachment 542871 [details] [diff] [review]
> Updated fix
Patch became bit rotten after
http://hg.mozilla.org/mozilla-central/rev/8f20dc5f4c8f
Assignee | ||
Comment 17•13 years ago
|
||
Works fine if you tell it to ignore a few lines of context (e.g. qpushed just fine over hear).
Comment 18•13 years ago
|
||
Comment on attachment 542871 [details] [diff] [review]
Updated fix
r=dbaron, except you'll need to run the reftest in layout/style/test/test_visited_reftests rather than from the reftest harness if you want it to pass reliably (due to async link coloring). You should probably make it a mathml-named test in the css-visited reftests directory to match.
Attachment #542871 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 19•13 years ago
|
||
Good catch. Will do.
Assignee | ||
Comment 20•13 years ago
|
||
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla10
Comment 21•13 years ago
|
||
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
•