Bug 35042 - getElementById() fails on foreign elements in foreignObject
: getElementById() fails on foreign elements in foreignObject
Status: UNCONFIRMED
: WebKit
SVG
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2010-02-17 09:40 PST by
Modified: 2011-07-22 10:43 PST (History)


Attachments
Test case exhibiting the problem (674 bytes, image/svg+xml)
2010-02-17 14:04 PST, Jeff Schiller
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-02-17 09:40:28 PST
Attached test case passes in Firefox but fails in Opera and WebKit.  Is this because these browsers do not yet understand MathML?

I'll note that

fo.firstChild.getAttribute("id")

returns 'm'.  But document.getElementById("m") returns null

This is probably because the grammar is not understood so it's unclear to use the @id attribute as an ID?
------- Comment #1 From 2010-02-17 14:01:58 PST -------
Currently, there is no test case attached.

> This is probably because the grammar is not understood so it's unclear to use
> the @id attribute as an ID?

Yes, that sounds likely.
------- Comment #2 From 2010-02-17 14:04:55 PST -------
Created an attachment (id=48936) [details]
Test case exhibiting the problem
------- Comment #3 From 2010-03-14 12:58:36 PST -------
(In reply to comment #1)
> Currently, there is no test case attached.
> 
> > This is probably because the grammar is not understood so it's unclear to use
> > the @id attribute as an ID?
> 
> Yes, that sounds likely.

I confirm. The testcase is working well on a build of the latest trunk with MathML enabled.

The only thing to do is to wait for WebKit with MathML enabled by default.
------- Comment #4 From 2011-07-22 00:45:51 PST -------
On r91478 the rectangle *is* green.
------- Comment #5 From 2011-07-22 10:43:29 PST -------
MathML is enabled in nightlies and in Safari 5.1, so that would explain it.