Bug 42117 - AX: Data table heuristics: consider assuming data table for 'zebra-striped' rows
Summary: AX: Data table heuristics: consider assuming data table for 'zebra-striped' rows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: chris fleizach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 16:16 PDT by chris fleizach
Modified: 2010-07-14 14:11 PDT (History)
1 user (show)

See Also:


Attachments
Patch (7.04 KB, patch)
2010-07-12 16:18 PDT, chris fleizach
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chris fleizach 2010-07-12 16:16:33 PDT
Data table heuristics: consider assuming data table for 'zebra-striped' rows

* NOTES
We should consider adding a data table heuristic if every other row is an alternating color. 'zebra-striped' rows are a common design pattern. See screen shot that was not triggered as a data table before the ARIA roles were added.
Comment 1 chris fleizach 2010-07-12 16:18:56 PDT
Created attachment 61281 [details]
Patch
Comment 2 Darin Adler 2010-07-14 10:26:02 PDT
Comment on attachment 61281 [details]
Patch

> +    Vector<Color> alternatingColorCache;

Why a variable-size vector here instead of a fixed array?
Comment 3 Darin Adler 2010-07-14 10:34:23 PDT
Comment on attachment 61281 [details]
Patch

> +            // For the first 5 rows, cache the background color so we can check if this table has zebra-striped rows.
> +            if (row < 5 && row == (int)alternatingColorCache.size()) {

If you have to do type casting, you should do a C++ cast, not C.

> +                alternatingColorCache.append(rowColor);

I'm not sure "cache" is the right name for this data structure. I'd just call it rowColors.

Code seems OK, I’ll say r=me
Comment 4 chris fleizach 2010-07-14 14:11:32 PDT
http://trac.webkit.org/changeset/63353
Comment 5 chris fleizach 2010-07-14 14:11:53 PDT
looks like the commit-log-editor chose the wrong change log