Closed Bug 1262563 Opened 8 years ago Closed 8 years ago

fire mutation events for proxied accessibles

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: tbsaunde, Assigned: tbsaunde)

Details

Attachments

(7 files)

      No description provided.
Later we will call this for proxies where we don't have an event, and anyway
  all we need the event for is if it came from user input.
Attachment #8738670 - Flags: review?(dbolter)
Attachment #8738673 - Flags: review?(dbolter)
Attachment #8738670 - Flags: review?(dbolter) → review+
Attachment #8738672 - Flags: review?(dbolter) → review+
Attachment #8738673 - Flags: review?(dbolter) → review+
Attachment #8738675 - Flags: review?(dbolter) → review+
Attachment #8738676 - Flags: review?(dbolter) → review+
Attachment #8738677 - Flags: review?(dbolter) → review+
Thanks for splitting this up.
Especially for hide events its better to use the parent stored in the event
than the parent of the object when the event is fired.  However xul trees fire
show / hide events where the event's type is AccEvent not a subtype of
AccMutationEvent, and in that case we need to fall back to the objects parent.
Attachment #8743487 - Flags: review?(dbolter)
Comment on attachment 8743487 [details] [diff] [review]
fix how FireShowHideEvent gets the parent of a hide event target

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

r=me with comment. Also it might be good to specify this patch is atk only in the commit message.

::: accessible/atk/AccessibleWrap.cpp
@@ +1374,5 @@
> +        AccMutationEvent* event = downcast_accEvent(aEvent);
> +        Accessible* parentAcc = event ? event->Parent() : accessible->Parent();
> +        AtkObject* parent = AccessibleWrap::GetAtkObject(parentAcc);
> +        return FireAtkShowHideEvent(atkObj, parent, false,
> +                                    aEvent->IsFromUserInput());

Mostly cut and paste right? Slight odor... worth a function? (Might be a good place to add a comment about XUL being the reason we need to resort to accessible->Parent in the ternary)
Attachment #8743487 - Flags: review?(dbolter) → review+
Assignee: nobody → tbsaunde+mozbugs
You need to log in before you can comment on or make changes to this bug.