Closed Bug 1178272 Opened 9 years ago Closed 9 years ago

Move table semantics to a separate mozTableAccessible.mm file

Categories

(Core :: Disability Access APIs, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox42 --- affected
firefox44 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

Details

(Whiteboard: [please apply after patch for bug 1177640])

Attachments

(1 file, 4 obsolete files)

Follow-up of bug 744790:

> it'd be good to move this code into separate class, that seems goes with current architecture, and you can skip IsTable() checks
Summary: Move table semantics to a separate mozTableAccessible.mm → Move table semantics to a separate mozTableAccessible.mm file
Assignee: nobody → fred.wang
Attached patch Patch V1 (obsolete) — Splinter Review
Attached patch Patch V2 (obsolete) — Splinter Review
Attachment #8668556 - Flags: review?(surkov.alexander)
Comment on attachment 8668556 [details] [diff] [review]
Patch V2

Review of attachment 8668556 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/mac/AccessibleWrap.mm
@@ +289,5 @@
>      case roles::LINK:
>        return [mozLinkAccessible class];
>  
> +    case roles::TABLE:
> +    case roles::MATHML_TABLE:

grid, treetable?

@@ +297,5 @@
> +    case roles::MATHML_TABLE_ROW:
> +      return [mozTableRowAccessible class];
> +
> +    case roles::CELL:
> +    case roles::MATHML_CELL:

gridcell, column/rowheader

can we use IsTableCell() instead?

it makes sense to check IsLayout stuff at this point

@@ +299,5 @@
> +
> +    case roles::CELL:
> +    case roles::MATHML_CELL:
> +      return [mozTableCellAccessible class];
> +      

nit: whitespaces

::: accessible/mac/mozTableAccessible.mm
@@ +8,5 @@
> +#import "mozTableAccessible.h"
> +#import "nsCocoaUtils.h"
> +
> +@implementation mozTablePartAccessible
> +- (BOOL)isLayoutTablePart;

maybe isForLayout or isLayout
Attachment #8668515 - Attachment is obsolete: true
Attached patch Patch V3 (obsolete) — Splinter Review
This version uses the IsTable* functions instead of testing roles, so the class creation should be consistent with the current behavior.

However, the comment in https://dxr.mozilla.org/mozilla-central/source/accessible/mac/Platform.mm?offset=0#40 seems to suggest that IPC can not be used at this point:

1) ProxyAccessible::IsTable* functions won't work correctly if bug 1210477 is fixed by making these functions use IPC calls.

2) The ProxyAccessible::TableIsProbablyForLayout can not be used if we want to restrict the creation of tabular classes to only "real" tables.
Attachment #8668556 - Attachment is obsolete: true
Attachment #8668556 - Flags: review?(surkov.alexander)
Attachment #8668593 - Flags: review?(surkov.alexander)
Attached patch Patch V4 (obsolete) — Splinter Review
Version 4 tries to move the "layout table" check at the creation for normal Accessibles, but this is not for Proxy Accessibles. I'm not sure putting the verification into different places makes the patch better than version 3...
Attached patch Patch V3Splinter Review
updating V3 (fix build & whitespace errors)
Attachment #8668593 - Attachment is obsolete: true
Attachment #8668593 - Flags: review?(surkov.alexander)
Attachment #8668721 - Flags: review?(surkov.alexander)
@Marco: can you test some tables with this build and tells whether anything is broken:

http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/fred.wang@free.fr-6bcfee452e28/try-macosx64/firefox-44.0a1.en-US.mac.dmg
Flags: needinfo?(mzehe)
This feels like it still works as expected. I tried both a Bugzilla bug which has some genuine tables, and also the test case from bug 1177640 where I have a data table and a layout table. No crashes, and all exposure is as I would have expected.
Flags: needinfo?(mzehe)
Comment on attachment 8668721 [details] [diff] [review]
Patch V3

Review of attachment 8668721 [details] [diff] [review]:
-----------------------------------------------------------------

i cannot think of anything nicer, so rs=me
Attachment #8668721 - Flags: review?(surkov.alexander) → review+
Depends on: 1177640
Attachment #8668624 - Attachment is obsolete: true
https://treeherder.mozilla.org/#/jobs?repo=try&revision=39335b8bc2b8
Keywords: checkin-needed
Whiteboard: [please apply after patch for bug 1177640]
https://hg.mozilla.org/mozilla-central/rev/c10f8817d787
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: