Bug 22578
| Summary: | hasTagName does not play well with <video>, <audio> and <source> | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Julien Chaffraix <jchaffraix> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | annevk, emacemac7, eric.carlson |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Julien Chaffraix
Currently the HTMLElementFactory (and make_names.pl) uses the following code to create a <video> element:
if (!MediaPlayer::isAvailable())
return new HTMLElement(tagName, doc);
return new HTMLVideoElement(videoTag, doc);
This means that the common pattern:
if (element->hasTagName(videoTag))
HTMLVideoElement* htmlElement = static_cast<HTMLVideoElement*>(element);
may fail for those elements.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Anne van Kesteren
Pretty sure this is no longer a problem.