Closed Bug 540389 Opened 10 years ago Closed 10 years ago

WARNING: Bad accessible tree!: file ../../../mozilla-central/accessible/src/base/nsAccessible.cpp, line 2949 [tabbrowser tab]

Categories

(Core :: Disability Access APIs, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: ginnchen+exoracle, Assigned: surkov)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

2944 #ifdef DEBUG
2945   NS_ASSERTION(!parentAcc->IsDefunct(), "Defunct parent!");
2946 
2947   parentAcc->EnsureChildren();
2948   if (parent != mParent)
2949     NS_WARNING("Bad accessible tree!");
2950 #endif

What kind of error are we trying to detect here?

We do GetAccessibleInParentChain() only if mParent is null, and it seems we didn't do SetParent() here.
(In reply to comment #0)
> 2944 #ifdef DEBUG
> 2945   NS_ASSERTION(!parentAcc->IsDefunct(), "Defunct parent!");
> 2946 
> 2947   parentAcc->EnsureChildren();
> 2948   if (parent != mParent)
> 2949     NS_WARNING("Bad accessible tree!");
> 2950 #endif
> 
> What kind of error are we trying to detect here?

we detect a case when an accessible has a parent accessible but this parent accessible hasn't this accessible in children.

> 
> We do GetAccessibleInParentChain() only if mParent is null, and it seems we
> didn't do SetParent() here.

and that's a problem.
(In reply to comment #1)
> > What kind of error are we trying to detect here?
> 
> we detect a case when an accessible has a parent accessible but this parent
> accessible hasn't this accessible in children.

Thanks, I must misread the code when I raise the question.

So the problem is why nsXULTabAccessible hasn't nsXULToolbarButtonAccessible in its children.
(In reply to comment #2)

> So the problem is why nsXULTabAccessible hasn't nsXULToolbarButtonAccessible in
> its children.

It sounds tab has close button and tab accessible doesn't allow accessible anonymous children.
Summary: WARNING: Bad accessible tree!: file ../../../mozilla-central/accessible/src/base/nsAccessible.cpp, line 2949 → WARNING: Bad accessible tree!: file ../../../mozilla-central/accessible/src/base/nsAccessible.cpp, line 2949 [tabbrowser tab]
Attached patch wip (obsolete) — Splinter Review
Blocks: treea11y
Attached patch patchSplinter Review
Assignee: nobody → surkov.alexander
Attachment #422188 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #422197 - Flags: superreview?(mconnor)
Attachment #422197 - Flags: review?(marco.zehe)
Attachment #422197 - Flags: review?(bolterbugz)
Comment on attachment 422197 [details] [diff] [review]
patch

r=me for the /accessible part, let's make sure taking those nodes out of our tree via role=presentation doesn't break anything before landing.

Does this get rid of all those warnings?
Attachment #422197 - Flags: review?(bolterbugz) → review+
Comment on attachment 422197 [details] [diff] [review]
patch

r=me. Thanks!
Attachment #422197 - Flags: review?(marco.zehe) → review+
Mike, toolkit and browser changes are pure a11y changes, I added role="presentation" on elements that shouldn't be exposed to AT.
Comment on attachment 422197 [details] [diff] [review]
patch

What you really want is review from a peer for browser/toolkit, this doesn't really change anything wrt APIs and such, so SR isn't required, but i can give you review+ for those bits, so you're good to go.
Attachment #422197 - Flags: superreview?(mconnor) → review+
Yes, thank you.
landed on 1.9.3 - http://hg.mozilla.org/mozilla-central/rev/3198c740b660
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I'm still getting the warnings unfortunately (dumped to terminal during a11y mochitests run).
Status: RESOLVED → REOPENED
OS: OpenSolaris → All
Hardware: x86 → All
Resolution: FIXED → ---
Really? Tabbrowser fails? If no then please file another bug because I don't want to keep one bug for every wrong creation of accessible tree.
Close this one and clone it for the new bug.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
David, could you please look if errors you get are different from Ginn's ones described in bug 541039 and if so then file new bug?
Alexander, I'm getting the same warning described by this bug.
WARNING: Bad accessible tree!: file /Users/dtb/mozworkspace/src/accessible/src/base/nsAccessible.cpp

You don't get them?
(In reply to comment #17)
> Alexander, I'm getting the same warning described by this bug.
> WARNING: Bad accessible tree!: file
> /Users/dtb/mozworkspace/src/accessible/src/base/nsAccessible.cpp

Do you get it because toolbarbutton is not a child of tab? 

This assertion is kind of common assertion. It's not good idea to keep one bug for all broken tree cases. Please stop debugger when you get an assertion and look who is child and who is parent. If we don't have a bug for your case then please file new one.
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.