Bug 20776
Summary: | Incompatibility with FF when handle 'object' tag | ||
---|---|---|---|
Product: | WebKit | Reporter: | Feng Qian <feng> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | OS X 10.5 | ||
URL: | http://j2e.com/new&beta |
Feng Qian
The reported URL works in FF and not in Safari. The expected behavior in FF is that, after editing the text area, and close the window, it should alert the user whether s/he wants to discard changes.
In Safari, the JS code of 'document.j2e.changed()' throws an exception because 'document.j2e' is undefined. The HTML source is incorrect in this case. It looks like
<object id="j2e" ... >
<param> ...
<param>
some text here
It misses </object> to close the tag. WebKit determines that an HTMLObjectElement is not a docNamedNode (see code in HTMLObjectElement::updateDocNamedItem) because it thinks
the object element has child that's text node and with non-whitespace texts.
I did further test by closing <object> with </object>, but put some text between, or put a non-param tag between. FF allows 'document.j2e' but Safari doesn't.
After chatting with Maciej in IRC channel, he mentioned the rule for HTMLObjectElement was to handle a common error (?) that <embed> element is put between <object> and </object>.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Feng Qian
Sorry, hit back button, submitted twice.
*** This bug has been marked as a duplicate of 20775 ***