Bug 22578 - hasTagName does not play well with <video>, <audio> and <source>
Summary: hasTagName does not play well with <video>, <audio> and <source>
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-01 16:23 PST by Julien Chaffraix
Modified: 2023-12-28 08:19 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2008-12-01 16:23:30 PST
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.
Comment 1 Anne van Kesteren 2023-12-28 08:19:11 PST
Pretty sure this is no longer a problem.