Closed Bug 841488 Opened 11 years ago Closed 11 years ago

Move HTMLSelectElement to WebIDL

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

      No description provided.
Assignee: nobody → Ms2ger
So, I have hit a fun problem. For select.options, the binding code does the following:

  nsRefPtr<mozilla::dom::HTMLOptionsCollection> result;
  result = self->Options();
  if (!WrapNewBindingObject(cx, obj, result, vp)) {
    // ...

WrapNewBindingObject gets a HTMLOptionsCollection* value, and calls value->GetWrapperPreserveColor(). The fun part is that HTMLOptionsCollection inherits from nsIHTMLCollection and nsWrapperCache, and both of these implement a GetWrapperPreserveColor...

If someone has a way to make that compile, I'd love to hear about it.
Putting "using nsWrapperCache::GetWrapperPreserveColor;" on HTMLOptionsCollection ought to do it, I'd think.
Attachment #728994 - Flags: review?(khuey)
There really is no point to having them both.
Attachment #728995 - Flags: review?(khuey)
Attachment #728996 - Flags: review?(khuey)
Comment on attachment 728994 [details] [diff] [review]
Part a: Rename nsHTMLSelectElement

Review of attachment 728994 [details] [diff] [review]:
-----------------------------------------------------------------

I'm assuming you can run sed competently.
Attachment #728994 - Flags: review?(khuey) → review+
Attachment #728997 - Attachment is obsolete: true
Attachment #728997 - Flags: review?(khuey)
Attachment #732928 - Flags: review?(khuey)
Comment on attachment 728996 [details] [diff] [review]
Part c: Implement the remainder of the WebIDL API

Review of attachment 728996 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/content/src/HTMLSelectElement.cpp
@@ +602,5 @@
> +{
> +  nsGenericHTMLElement& element =
> +    aElement.IsHTMLOptionElement() ?
> +    static_cast<nsGenericHTMLElement&>(aElement.GetAsHTMLOptionElement()) :
> +    static_cast<nsGenericHTMLElement&>(aElement.GetAsHTMLOptGroupElement());

It would be nice if the codegen could provide a GetAsCommonBaseClass method for unions.
Attachment #728996 - Flags: review?(khuey) → review+
Blocks: 856629
https://hg.mozilla.org/mozilla-central/rev/408f851aeb6b
https://hg.mozilla.org/mozilla-central/rev/a809ae74995c
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite- → in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Depends on: 862084
Depends on: 862092
Depends on: 877910
Depends on: 952198
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: