Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311292 - QI shouldn't return S_OK for IAText if there are only attributeListeners
Summary: QI shouldn't return S_OK for IAText if there are only attributeListeners
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-01 16:48 EDT by Carolyn MacLeod CLA
Modified: 2010-05-03 22:43 EDT (History)
1 user (show)

See Also:
Silenio_Quarti: review+


Attachments
Only support IAccessibleText if there are accessibleTextListeners (1.06 KB, patch)
2010-05-01 16:48 EDT, Carolyn MacLeod CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2010-05-01 16:48:50 EDT
Created attachment 166723 [details]
Only support IAccessibleText if there are accessibleTextListeners

Run org.eclipse.swt.examples.accessibility.LiveRegionExample.
Run AccProbe, and look at the Label at the top of the shell.
This Label implements an accessibleAttributeListener so that it can return object attributes.
The code for QI currently returns S_OK for IAccessibleText. This Label is just a plain Label - it is not an IAccessibleText (or even a ROLE_TEXT) so it returns all sorts of bogus information when AccProbe sends any of the text methods to the IAccessibleText interface.
The fix is to only answer S_OK for IAccessibleText if there are accessibleTextListeners. It doesn't make sense for an application to return text attributes without also implementing accessibleTextListener.
Comment 1 Carolyn MacLeod CLA 2010-05-03 22:43:21 EDT
Fixed > 20100503