View-based NSOutlineView doesn't support Accessibility properly
| Originator: | fb | ||
| Number: | rdar://12477393 | Date Originated: | 2012-10-11 |
| Status: | Duplicate/12045566 | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.8 |
| Classification: | Other Bug | Reproducible: | Always |
Dupe of http://www.openradar.me/12045566 SUMMARY: Setting individual row heights via [NSOutlineViewDelegate outlineView:heightOfRowByItem:] and then exposing the NSOutlineView in question to Accessibility requests results into [NSTableView preparedCellAtColumn:row:] being sent, which isn't supposed to be sent to view-based table/outline views. STEPS TO REPRODUCE: 1) Install and run the attached ModifiedTableViewPlayground project. (This is based on Apple's TableViewPlayground sample project, with an added [NSOutlineViewDelegate outlineView:heightOfRowByItem:] implementation in ATComplexOutlineController, and a deliberate division by zero crasher in [TestOutlineView preparedCellAtColumn:row:] to highlight the problem. 2) Run Accessibility Inspector. 3) Move the mouse around over the "Complex OutlineView" window's outline view hierarchy, while watching system.log in Console.app. EXPECTED RESULTS: No ominous log messages. ACTUAL RESULTS: After hovering the mouse over a folder cell, I eventually get this message in Console: 06.08.12 01:20:59,638 TableViewPlayground[20356]: View Based NSTableView error: preparedCellAtColumn:row: was called. Please log a bug with the backtrace from this log, or stop using the method. And the deliberate crash I added (see above) yields the following backtrace: 0 com.apple.demo.TableViewPlayground 0x0000000100fe543b -[TestOutlineView preparedCellAtColumn:row:] + 59 (ATComplexOutlineController.m:59) 1 com.apple.AppKit 0x00007fff85082c43 -[NSTableViewCellProxy cellForProxy] + 153 2 com.apple.AppKit 0x00007fff85082c77 -[NSTableViewCellProxy realElement] + 41 3 com.apple.AppKit 0x00007fff84db675c -[NSAccessibilityProxy accessibilityHitTest:] + 38 4 com.apple.AppKit 0x00007fff851d1f60 -[NSOutlineColumnMockGroup accessibilityHitTest:] + 472 5 com.apple.AppKit 0x00007fff84fcb51d -[NSOutlineRow accessibilityHitTest:] + 301 6 com.apple.AppKit 0x00007fff85081db1 -[NSTableView(NSTableViewAccessibility) accessibilityHitTest:] + 317 7 com.apple.AppKit 0x00007fff8515c96a -[NSWindow(NSWindowAccessibility) accessibilityHitTest:] + 305 8 com.apple.AppKit 0x00007fff84dcdc3d -[NSApplication(NSApplicationAccessibility) accessibilityHitTest:] + 252 9 com.apple.AppKit 0x00007fff84db038b CopyElementAtPosition + 127 10 com.apple.HIServices 0x00007fff8b039625 _AXXMIGCopyElementAtPosition + 143 11 com.apple.HIServices 0x00007fff8b03fd53 _XCopyElementAtPosition + 265 12 com.apple.HIServices 0x00007fff8b01df9e mshMIGPerform + 443 13 com.apple.CoreFoundation 0x00007fff84136a19 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41 14 com.apple.CoreFoundation 0x00007fff84136759 __CFRunLoopDoSource1 + 153 15 com.apple.CoreFoundation 0x00007fff841698bf __CFRunLoopRun + 1775 16 com.apple.CoreFoundation 0x00007fff84168dd2 CFRunLoopRunSpecific + 290 17 com.apple.HIToolbox 0x00007fff8c576774 RunCurrentEventLoopInMode + 209 18 com.apple.HIToolbox 0x00007fff8c576512 ReceiveNextEventCommon + 356 19 com.apple.HIToolbox 0x00007fff8c5763a3 BlockUntilNextEventMatchingListInMode + 62 20 com.apple.AppKit 0x00007fff84b7cfa3 _DPSNextEvent + 685 21 com.apple.AppKit 0x00007fff84b7c862 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 22 com.apple.AppKit 0x00007fff84b73c03 -[NSApplication run] + 517 23 com.apple.AppKit 0x00007fff84b18656 NSApplicationMain + 869 24 com.apple.demo.TableViewPlayground 0x0000000100fdcbb2 main + 34 (main.m:53) 25 libdyld.dylib 0x00007fff82b517e1 start + 1 REGRESSION: - NOTES: Looks like NSTableView's -accessibilityHitTest: implementation fails to take the difference between being view-based or cell-based into account. SAMPLE CODE: http://manytricks.com/sandbox/codesamples/radar/modifiedtableviewplayground.zip
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!