Closed Bug 478810 Opened 15 years ago Closed 15 years ago

document role="textbox" fails assertion

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b4

People

(Reporter: davidb, Assigned: davidb)

Details

(Keywords: access, verified1.9.1)

Attachments

(1 file, 2 obsolete files)

Spin off from bug 467387, failing test will be posted as part of patch/fix there.
The problem is in in nsAccessible::GetState, when we do:
 nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode))
 NS_ENSURE_STATE(content);
I chatted with bz, and we debugged this together. The mDOMNode is an nsHTMLDocument, which does not support nsIContent. Taking...
Assignee: nobody → david.bolter
Status: NEW → ASSIGNED
Attached patch WIP (obsolete) — Splinter Review
This fixes the bug. We basically need to be careful in nsAccessible with mDOMNode. Sometimes the concrete type will be nsHTMLDocument which does not support nsIContent -- see patch for details.

Please check for leaks... I'm doing QI
Attachment #363932 - Flags: review?(surkov.alexander)
Attachment #363932 - Flags: review?(marco.zehe)
Attached patch WIP tweaked (obsolete) — Splinter Review
tweaked a test.
Attachment #363932 - Attachment is obsolete: true
Attachment #363940 - Flags: review?(surkov.alexander)
Attachment #363932 - Flags: review?(surkov.alexander)
Attachment #363932 - Flags: review?(marco.zehe)
Comment on attachment 363940 [details] [diff] [review]
WIP tweaked


>+    if (!content) {
>+      // mDOMNode is probably an nsHTMLDocument (perhaps from an iframe)
>+      nsCOMPtr<nsIDocument> document(do_QueryInterface(mDOMNode));
>+      if (document)
>+        content = document->GetRootContent();
>+    }

use nsCoreUtils::GetRoleContent instead, with this r=me
Attachment #363940 - Flags: review?(surkov.alexander) → review+
Attached patch patch 1Splinter Review
Carrying forward Surkov's r+, thanks, Marco if you approve please push this fix.
Attachment #363940 - Attachment is obsolete: true
Attachment #364103 - Flags: review?(marco.zehe)
Comment on attachment 364103 [details] [diff] [review]
patch 1

This is great, thanks!
Attachment #364103 - Flags: review?(marco.zehe) → review+
Pushed on David's behalf in changeset:
http://hg.mozilla.org/mozilla-central/rev/c7980dea1918
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #364103 - Flags: approval1.9.1?
Comment on attachment 364103 [details] [diff] [review]
patch 1

a191=beltzner
Attachment #364103 - Flags: approval1.9.1? → approval1.9.1+
Pushed to mozilla-1.9.1 on David's behalf in changeset:
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/ecba245024a0
Keywords: access, fixed1.9.1
Target Milestone: --- → mozilla1.9.1b4
Verified fixed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090422 Shiretoko/3.5b4pre (.NET CLR 3.5.30729)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: