Closed
Bug 449746
Opened 16 years ago
Closed 16 years ago
Switch content is not displayed with requiredExtensions="http://www.w3.org/1999/xhtml " or requiredExtensions="http://www.w3.org/1998/Math/MathML "
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b2
People
(Reporter: fredw, Assigned: fredw)
Details
Attachments
(2 files, 3 obsolete files)
2.21 KB,
application/xml
|
Details | |
3.70 KB,
patch
|
roc
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5
I made an XHTML+MathML+SVG page with Amaya. A requiredExtensions="http://www.w3.org/1999/xhtml" is attached to the <foreignObject/> element. This attribute prevents Firefox to render the foreignObject properly.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Assignee | ||
Comment 1•16 years ago
|
||
Updated•16 years ago
|
Component: General → SVG
Product: Firefox → Core
QA Contact: general → general
Comment 2•16 years ago
|
||
At the moment mozilla any use of requiredExtensions disables rendering.
Where have you got http://www.w3.org/1999/xhtml from? Other than it is the namespace for xhtml. Why is that a valid value for requiredExtensions?
http://www.w3.org/TR/SVG/extend.html#AnExample uses "http://example.com/SVGExtensions/EmbeddedXHTML" and I've no idea at all where that is from.
Assignee | ||
Comment 3•16 years ago
|
||
"requiredExtensions=http://www.w3.org/1999/xhtml" is automatically generated by Amaya. I don't know where this namespace comes but it could be a mistake of the developers.
Assignee | ||
Comment 4•16 years ago
|
||
"requiredExtensions="http://www.w3.org/1998/Math/MathML"" appears in a W3C note (but the example is not well-formed...):
http://www.w3.org/Math/Documents/Notes/graphics.xml#mathml-in-svg-guidelines
Comment 5•16 years ago
|
||
http://lists.w3.org/Archives/Public/www-svg/2004Feb/0074.html
Looks from that like a browser can do whatever it likes and that trying to detect xhtml support using requiredExtensions is not going to be portable across different browser implementations.
Assignee | ||
Comment 6•16 years ago
|
||
In the example given in the SVG list, it seems that the <switch/> is supposed to be used for non-standard XML content.
But in the W3C note, the author uses the <foreignObject/> for mathematical formulae inside SVG graphics. The <switch/> allows to give an alternate text for browser that can't display MathML inside SVG. It was the case for Firefox in the past and it is still the case for many browsers.
Since Firefox is able to display MathML and XHTML inside SVG, I suppose it must accept the two URI I gave for "requiredExtensions" (Amaya does so).
Comment 7•16 years ago
|
||
I just checked the Safari code and it works the same as Mozilla.
How do Opera and the Adobe SVG plug-in treat requiredExtensions?
If you want this to go any further your best bet is to raise this on the w3c svg mailing list: http://lists.w3.org/Archives/Public/www-svg/ suggesting that SVG specification directly indicate that browsers that support xhtml and mathml should use those URIs.
Assignee | ||
Comment 8•16 years ago
|
||
Hi,
I finally get an answer from the SVG WG:
http://lists.w3.org/Archives/Public/www-svg/2008Sep/0036.html
Attachment #338442 -
Flags: review?(longsonr)
Comment 9•16 years ago
|
||
Thanks for pursuing this Frédéric, but all that Doug has has said so far is that the working group will discuss the issue, so it's a little early to request review.
Assignee | ||
Comment 10•16 years ago
|
||
OK, no problem. At least a patch is ready. Let's wait the WG decision.
Comment 11•16 years ago
|
||
Comment on attachment 338442 [details] [diff] [review]
Take into account the MathML and XHTML URI when checking the requiredExtensions
> /**
>+ * Check whether we support the given extension string.
>+ *
>+ * @param aExtension the URI of an extension. Known extensions are
>+ * MathML and XHTML.
>+ */
>+PRBool
>+NS_SVG_HaveExtension(const nsAString& aExtension)
This is an internal function to this module so it should be static and also should not begin NS_SVG_
>+{
>+ if (!NS_SVGEnabled()) {
>+ return PR_FALSE;
>+ }
These lines are not required. I think you copied them from NS_SVG_HaveFeature which needs them because it can be called from non-svg code.
>+
>+#define SVG_SUPPORTED_EXTENSION(str) if (aExtension.Equals(NS_LITERAL_STRING(str).get())) return PR_TRUE;
>+ SVG_SUPPORTED_EXTENSION("http://www.w3.org/1999/xhtml")
>+ SVG_SUPPORTED_EXTENSION("http://www.w3.org/1998/Math/MathML")
You need to put the line above inside #ifdef MOZ_MATHML
Attachment #338442 -
Flags: review?(longsonr) → review-
Assignee | ||
Comment 12•16 years ago
|
||
Thanks a lot Robert. This is a new patch that takes into account your comments.
Attachment #338442 -
Attachment is obsolete: true
Assignee | ||
Comment 13•16 years ago
|
||
The proposition of Doug:
http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0299.html#start299
The resolution of the WG:
http://www.w3.org/2008/09/16-svg-minutes.html#item03
Comment 14•16 years ago
|
||
Comment on attachment 338448 [details] [diff] [review]
Take into account the MathML and XHTML URI when checking the requiredExtensions
When you ask for reviews on this I think you should get an additional review from a mathml peer as they need to sign off that our implementation of mathml is sufficiently complete that we should advertise it as supported.
Assignee | ||
Comment 15•16 years ago
|
||
Same testcase, but translate the alternate text "foreignObject not supported" so that it is in the visible area of the svg canvas.
Attachment #332913 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Attachment #338448 -
Flags: review?(longsonr)
Assignee | ||
Updated•16 years ago
|
Attachment #338448 -
Flags: review?(mozbugz)
Updated•16 years ago
|
Attachment #338448 -
Flags: review?(rbs)
Attachment #338448 -
Flags: review?(longsonr)
Attachment #338448 -
Flags: review+
Comment 16•16 years ago
|
||
See comment 14 for additional review.
Comment 17•16 years ago
|
||
Comment on attachment 338448 [details] [diff] [review]
Take into account the MathML and XHTML URI when checking the requiredExtensions
This looks good to me.
Attachment #338448 -
Flags: review?(mozbugz) → review+
Comment 18•16 years ago
|
||
(In reply to comment #16)
> See comment 14 for additional review.
Roger is no longer at uq, and so may not be responsive at that address.
I suggest waiting a few more days to see if Roger comments, and if not go with attachment 338448 [details] [diff] [review] as is.
Comment 19•16 years ago
|
||
(In reply to comment #14)
> When you ask for reviews on this I think you should get an additional review
> from a mathml peer as they need to sign off that our implementation of mathml
> is sufficiently complete that we should advertise it as supported.
The MathML support is as sufficiently complete as people expect and at least as good as any other browser.
Assignee | ||
Comment 20•16 years ago
|
||
Roger does not seem to respond, so I'll add the keyword "checkin-needeed" to this bug.
Keywords: checkin-needed
Updated•16 years ago
|
Attachment #338448 -
Flags: superreview?(roc)
Comment 21•16 years ago
|
||
You need a superreview before this can be checked in.
Keywords: checkin-needed
Updated•16 years ago
|
Assignee: nobody → fred.wang
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
// no extensions. So, if extensions are required, we don't have
// them available.
This comment is incorrect and needs to be fixed.
IMHO this code should be rewritten to use FindAttrValueIn. That would avoid any need for this macro.
Comment 23•16 years ago
|
||
I'm not sure I follow. FindAttrValueIn is for finding one of a number of possible attribute values and we're parsing a space separated list of values.
Oops, of course you're right. So one more question: why are we returning false if the required extensions list is the empty string?
Assignee | ||
Comment 25•16 years ago
|
||
http://www.w3.org/TR/SVG11/struct.html#RequiredExtensionsAttribute
"If the attribute is not present, then its implicit return value is "true". If a null string or empty string value is given to attribute requiredExtensions, the attribute returns "false"."
That's weird. But OK, just fix the comment and we should be good to go.
Assignee | ||
Comment 27•16 years ago
|
||
Attachment #338448 -
Attachment is obsolete: true
Attachment #338448 -
Flags: superreview?(roc)
Attachment #338448 -
Flags: review?(rbs)
Updated•16 years ago
|
Attachment #345020 -
Flags: superreview?(roc)
Attachment #345020 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Comment 28•16 years ago
|
||
Comment on attachment 345020 [details] [diff] [review]
change comments to indicate support of XHTML/MathML
[Checkin: Comment 28]
http://hg.mozilla.org/mozilla-central/rev/5fd646e4fcd2
NB: Please, provide a patch with full file path in the future.
Attachment #345020 -
Attachment description: change comments to indicate support of XHTML/MathML → change comments to indicate support of XHTML/MathML
[Checkin: Comment 28]
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•