Bug 35042 - getElementById() fails on foreign elements in foreignObject
: getElementById() fails on foreign elements in foreignObject
Status: UNCONFIRMED
Product: WebKit
Classification: Unclassified
Component: SVG
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-17 09:40 PST by Jeff Schiller
Modified: 2011-07-22 10:43 PDT (History)
3 users (show)

See Also:


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 Jeff Schiller 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 Alexey Proskuryakov 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 Jeff Schiller 2010-02-17 14:04:55 PST
Created attachment 48936 [details]
Test case exhibiting the problem
Comment 3 François Sausset 2010-03-14 12:58:36 PDT
(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 dda 2011-07-22 00:45:51 PDT
On r91478 the rectangle *is* green.
Comment 5 Alexey Proskuryakov 2011-07-22 10:43:29 PDT
MathML is enabled in nightlies and in Safari 5.1, so that would explain it.