Proxy handling for mozActionElements

RESOLVED FIXED in Firefox 42

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: lsocks, Assigned: lsocks)

Tracking

unspecified
mozilla42
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(2 attachments, 4 obsolete attachments)

Comment hidden (empty)
(Assignee)

Comment 1

3 years ago
Created attachment 8639068 [details] [diff] [review]
action-p1
Attachment #8639068 - Flags: review?(tbsaunde+mozbugs)
(Assignee)

Comment 2

3 years ago
Created attachment 8639069 [details] [diff] [review]
action p1 - {isTab, accessibilityArrayAttributeCount, hasPopup, Checked}
Attachment #8639068 - Attachment is obsolete: true
Attachment #8639068 - Flags: review?(tbsaunde+mozbugs)
Attachment #8639069 - Flags: review?(tbsaunde+mozbugs)
(Assignee)

Comment 3

3 years ago
Created attachment 8639077 [details] [diff] [review]
action p2 - click, value
Attachment #8639077 - Flags: review?(tbsaunde+mozbugs)
(Assignee)

Comment 4

3 years ago
Created attachment 8639079 [details] [diff] [review]
action p2 - click, value
Attachment #8639077 - Attachment is obsolete: true
Attachment #8639077 - Flags: review?(tbsaunde+mozbugs)
Attachment #8639079 - Flags: review?(tbsaunde+mozbugs)
(Assignee)

Comment 5

3 years ago
Created attachment 8639082 [details] [diff] [review]
action p2 - click, value
Attachment #8639079 - Attachment is obsolete: true
Attachment #8639079 - Flags: review?(tbsaunde+mozbugs)
Attachment #8639082 - Flags: review?(tbsaunde+mozbugs)
Comment on attachment 8639069 [details] [diff] [review]
action p1 - {isTab, accessibilityArrayAttributeCount, hasPopup, Checked}

> - (BOOL)isTab
> {
>-  AccessibleWrap* accWrap = [self getGeckoAccessible];
>-  return (accWrap && (accWrap->Role() == roles::PAGETAB));
>+  if (AccessibleWrap* accWrap = [self getGeckoAccessible])
>+    return (accWrap && (accWrap->Role() == roles::PAGETAB));

the accWrap check is redundant

>+
>+  if (ProxyAccessible* proxy = [self getProxyAccessible])
>+    return (proxy && (proxy->Role() == roles::PAGETAB));

same with proxy

> - (BOOL)hasPopup
> {
>-  AccessibleWrap* accWrap = [self getGeckoAccessible];
>-  return accWrap && (accWrap->NativeState() & mozilla::a11y::states::HASPOPUP);
>+  if (AccessibleWrap* accWrap = [self getGeckoAccessible])
>+    return accWrap->NativeState() & mozilla::a11y::states::HASPOPUP;

the mozilla::a11y is probably not needed

it seems strange NativeState() not State() is used but whatever

>   // By default this calls -[[mozAccessible children] count].
>   // Since we don't cache mChildren. This is faster.
>-  if ([attribute isEqualToString:NSAccessibilityChildrenAttribute])
>-    return [self getGeckoAccessible]->ChildCount() ? 1 : 0;
>+  if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
>+    if (accWrap)
>+      return accWrap->ChildCount() ? 1 : 0;
>+    else
>+      return proxy->ChildrenCount() ? 1 : 0;

no else after return
Attachment #8639069 - Flags: review?(tbsaunde+mozbugs) → review+
Attachment #8639082 - Flags: review?(tbsaunde+mozbugs) → review+
(Assignee)

Comment 7

3 years ago
Created attachment 8643061 [details] [diff] [review]
action p1 - {isTab, accessibilityArrayAttributeCount, hasPopup, Checked} with fixes

carry r=tbsaunde
Attachment #8639069 - Attachment is obsolete: true
Attachment #8643061 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/2b0b584ce01f
https://hg.mozilla.org/mozilla-central/rev/689c420edf65
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.