Closed
Bug 901656
Opened 12 years ago
Closed 12 years ago
nsIRadioGroupContainer can use HTMLInputElement
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: dzbarsky, Assigned: dzbarsky)
References
Details
Attachments
(1 file)
|
20.16 KB,
patch
|
Ms2ger
:
review+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment on attachment 785908 [details] [diff] [review]
Patch
Review of attachment 785908 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/base/src/nsDocument.cpp
@@ +1669,5 @@
> static_cast<nsCycleCollectionTraversalCallback*>(aClosure);
>
> NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(*cb,
> "mRadioGroups entry->mSelectedRadioButton");
> + cb->NoteXPCOMChild(static_cast<nsIContent*>(aData->mSelectedRadioButton));
ToSupports().
(Though it'd be nice if this could somehow use the macros...)
@@ +7297,5 @@
>
> NS_IMETHODIMP
> nsDocument::GetNextRadioButton(const nsAString& aName,
> const bool aPrevious,
> + HTMLInputElement* aFocusedRadio,
Fix the extra space, please
@@ +7336,5 @@
> }
> else if (++index >= numRadios) {
> index = 0;
> }
> + NS_ASSERTION(static_cast<nsGenericHTMLFormElement*>(radioGroup->mRadioButtons[index])->IsHTML(nsGkAtoms::input),
Ugh.
@@ +7344,2 @@
>
> NS_IF_ADDREF(*aRadioOut = radio);
Use forget() here.
::: content/base/src/nsDocument.h
@@ +727,5 @@
> nsIRadioVisitor* aVisitor,
> bool aFlushContent) MOZ_OVERRIDE;
> virtual void SetCurrentRadioButton(const nsAString& aName,
> + mozilla::dom::HTMLInputElement* aRadio) MOZ_OVERRIDE;
> + virtual mozilla::dom::HTMLInputElement* GetCurrentRadioButton(const nsAString& aName) MOZ_OVERRIDE;
Fix any cases where you go over the 80-column limit
::: content/html/content/src/HTMLFormElement.cpp
@@ +287,5 @@
>
> // nsISupports
>
> static PLDHashOperator
> +ElementTraverser(const nsAString& key, HTMLInputElement* element,
I wonder if there's a macro for this already...
@@ +295,3 @@
> static_cast<nsCycleCollectionTraversalCallback*>(userArg);
> +
> + cb->NoteXPCOMChild(static_cast<nsIContent*>(element));
ToSupports
@@ +2137,5 @@
>
> NS_IMETHODIMP
> HTMLFormElement::GetNextRadioButton(const nsAString& aName,
> const bool aPrevious,
> + HTMLInputElement* aFocusedRadio,
Spaces
@@ +2182,4 @@
> if (!radio)
> continue;
>
> // XXXbz why is this formControl check needed, exactly?
formControl is gone
::: content/html/content/src/HTMLFormElement.h
@@ +81,3 @@
> NS_IMETHOD GetNextRadioButton(const nsAString& aName,
> const bool aPrevious,
> + HTMLInputElement* aFocusedRadio,
Spaces
::: content/html/content/src/HTMLInputElement.cpp
@@ +3123,5 @@
> nsMouseEvent event(aVisitor.mEvent->mFlags.mIsTrusted,
> NS_MOUSE_CLICK, nullptr,
> nsMouseEvent::eReal);
> event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
> + rv = nsEventDispatcher::Dispatch(static_cast<nsIContent*>(selectedRadioButton),
ToSupports()
Attachment #785908 -
Flags: review?(Ms2ger) → review+
Comment 3•12 years ago
|
||
Comment on attachment 785908 [details] [diff] [review]
Patch
>From: David Zbarsky <dzbarsky@gmail.com>
>nsidomhttlinput things...try: -b d -p linux64
Here too.
| Assignee | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•