Proxy handling for mozActionElements

RESOLVED FIXED in Firefox 42

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: lsocks, Assigned: lsocks)

Tracking

unspecified
mozilla42
x86_64
macOS
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(2 attachments, 4 obsolete attachments)

No description provided.
Posted patch action-p1 (obsolete) — Splinter Review
Attachment #8639068 - Flags: review?(tbsaunde+mozbugs)
Attachment #8639068 - Attachment is obsolete: true
Attachment #8639068 - Flags: review?(tbsaunde+mozbugs)
Attachment #8639069 - Flags: review?(tbsaunde+mozbugs)
Posted patch action p2 - click, value (obsolete) — Splinter Review
Attachment #8639077 - Flags: review?(tbsaunde+mozbugs)
Posted patch action p2 - click, value (obsolete) — Splinter Review
Attachment #8639077 - Attachment is obsolete: true
Attachment #8639077 - Flags: review?(tbsaunde+mozbugs)
Attachment #8639079 - Flags: review?(tbsaunde+mozbugs)
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+
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
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.