Closed
Bug 767843
Opened 12 years ago
Closed 12 years ago
stop using nsIDOMHTMLOptionElement in a11y
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: tbsaunde, Assigned: tbsaunde)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
4.92 KB,
patch
|
Details | Diff | Splinter Review | |
4.98 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #636203 -
Flags: review?(dbolter)
Comment 2•12 years ago
|
||
Comment on attachment 636203 [details] [diff] [review]
patch
Review of attachment 636203 [details] [diff] [review]:
-----------------------------------------------------------------
::: accessible/src/html/HTMLSelectAccessible.cpp
@@ +234,5 @@
>
> // Are we selected?
> + bool selected = false;
> + nsHTMLOptionElement* option = nsHTMLOptionElement::FromContent(mContent);
> + if (option && option->Selected()) {
I'd do
bool selected = option && option->Selected();
note, below you don't have a null check option element, perhaps you can do
bool selected = nsHTMLOptionElement::FromContent(mContent)->Selected();
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to alexander :surkov from comment #2)
> Comment on attachment 636203 [details] [diff] [review]
> patch
>
> Review of attachment 636203 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: accessible/src/html/HTMLSelectAccessible.cpp
> @@ +234,5 @@
> >
> > // Are we selected?
> > + bool selected = false;
> > + nsHTMLOptionElement* option = nsHTMLOptionElement::FromContent(mContent);
> > + if (option && option->Selected()) {
>
> I'd do
> bool selected = option && option->Selected();
I guess you could do that, though I think you still need the if to change the state.
> note, below you don't have a null check option element, perhaps you can do
> bool selected = nsHTMLOptionElement::FromContent(mContent)->Selected();
actually, I'm pretty sure that code is, and has been busted for optgroups for a while. So I should probably add a null check htere.
Comment 4•12 years ago
|
||
Comment on attachment 636203 [details] [diff] [review]
patch
It makes sense to switch reviewer to Alexander.
Attachment #636203 -
Flags: review?(dbolter)
Comment 5•12 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #3)
> (In reply to alexander :surkov from comment #2)
> > Comment on attachment 636203 [details] [diff] [review]
> > patch
> >
> > Review of attachment 636203 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > ::: accessible/src/html/HTMLSelectAccessible.cpp
> > @@ +234,5 @@
> > >
> > > // Are we selected?
> > > + bool selected = false;
> > > + nsHTMLOptionElement* option = nsHTMLOptionElement::FromContent(mContent);
> > > + if (option && option->Selected()) {
> >
> > I'd do
> > bool selected = option && option->Selected();
>
> I guess you could do that, though I think you still need the if to change
> the state.
sure
bool selected = bla;
if (selected) {}
:)
> actually, I'm pretty sure that code is, and has been busted for optgroups
> for a while. So I should probably add a null check htere.
ok, I see
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #637553 -
Flags: review?(surkov.alexander)
Updated•12 years ago
|
Attachment #637553 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 7•12 years ago
|
||
Assignee | ||
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•