Bug 21886

Summary: window.HTMLOptionElement == "[object HTMLElementConstructor]" instead of HTMLOptionElementConstructor
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: WebCore JavaScriptAssignee: Alexey Proskuryakov <ap>
Severity: Normal CC: ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 21842    
Bug Blocks:    
Description Flags
test case
proposed fix sam: review+

Description Eric Seidel (no email) 2008-10-25 08:24:07 PDT
window.HTMLOptionElement == "[object HTMLElementConstructor]" instead of HTMLOptionElementConstructor

I filed this as bug 21842 originally, but that was decided invalid.  I'm not sure what the functionality of "new HTMLOptionElement" needs to be, but it seems that window.HTMLOptionElement should be a specifically-named constructor like all the rest of the HTMLElement "subclasses" instead of being just an HTMLElementConstructor.

See bug 21842 for more background.

To fix this will probably require using a new idl flag "CustomConstructor" to have the JSHTMLOptionElement generated class generate a getConstructor function with the appropriate types.
Comment 1 Alexey Proskuryakov 2008-10-26 04:51:21 PDT
Created attachment 24682 [details]
test case

This is a real bug that affects extending HTMLOptionElement prototype, not just a problem with its constructor name.
Comment 2 Alexey Proskuryakov 2008-10-26 05:41:46 PDT
I have a fix (window.Option and window.HTMLOptionElement are two different constructors, we need to provide both).
Comment 3 Alexey Proskuryakov 2008-10-26 14:47:18 PDT
Created attachment 24684 [details]
proposed fix
Comment 4 Alexey Proskuryakov 2008-10-27 01:00:11 PDT
Committed revision 37895.