Bug 115069 - AX: MathML multiscripts not exposed in Accessibility
Summary: AX: MathML multiscripts not exposed in Accessibility
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: chris fleizach
URL:
Keywords:
Depends on: 117184
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-23 17:42 PDT by chris fleizach
Modified: 2013-06-04 01:48 PDT (History)
9 users (show)

See Also:


Attachments
patch (32.06 KB, patch)
2013-04-23 23:02 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch (32.88 KB, patch)
2013-05-06 22:17 PDT, chris fleizach
buildbot: commit-queue-
Details | Formatted Diff | Diff
patch (32.87 KB, patch)
2013-05-06 22:48 PDT, chris fleizach
buildbot: commit-queue-
Details | Formatted Diff | Diff
patch (32.88 KB, patch)
2013-05-06 23:25 PDT, chris fleizach
buildbot: commit-queue-
Details | Formatted Diff | Diff
patch (32.89 KB, patch)
2013-05-07 09:16 PDT, chris fleizach
thorton: 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 2013-04-23 17:42:36 PDT
Multiscripts allow you to have pre and post (sub and superscript) objects. And any number of them

http://www.w3.org/TR/REC-MathML/chap3_4.html#sec3.4.7

Like

 <mmultiscripts>
      <mi> F </mi>
      <mn> 1 </mn>
      <none/>
      <mprescripts/>
      <mn> 0 </mn>
</mmultiscripts>

These do NOT render correctly in WebKit yet, but we can make them accessible!
Comment 1 chris fleizach 2013-04-23 17:43:00 PDT
The best plan seems to be to return an array of dictionaries that specify the sub/superscript object
Comment 2 chris fleizach 2013-04-23 17:43:08 PDT
rdar://13687511
Comment 3 chris fleizach 2013-04-23 23:02:12 PDT
Created attachment 199389 [details]
patch
Comment 4 chris fleizach 2013-04-23 23:15:43 PDT
Adding Tim to help with review
Comment 5 Tim Horton 2013-05-03 13:42:00 PDT
Comment on attachment 199389 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=199389&action=review

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:3729
> +            AccessibilityObject* axChild = axObjectCache()->getOrCreate(child);

I'm a bit unclear on how this doesn't go ahead and search tons of irrelevant nodes after the first time it finds an mprescripts.

> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1490
> +static NSString *_convertMathMultiscriptPairsToString(NSArray *pairs)

Drop the leading underscore, we don't do that.

> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1497
> +        index++;

This is fine but could use enumerateObjectsUsingBlock instead of manually keeping track of the index.
Comment 6 chris fleizach 2013-05-06 09:13:08 PDT
(In reply to comment #5)
> (From update of attachment 199389 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=199389&action=review
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:3729
> > +            AccessibilityObject* axChild = axObjectCache()->getOrCreate(child);
> 
> I'm a bit unclear on how this doesn't go ahead and search tons of irrelevant nodes after the first time it finds an mprescripts.
> 

After it finds the prescript, at that point we want to add the rest of the (first-level children) as accessibility objects (as long as their math elements). 

This is essentially what we do for every dom/render object in the tree anyway, so it's no different than the rest of the AX structure in this case

> > Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1490
> > +static NSString *_convertMathMultiscriptPairsToString(NSArray *pairs)
> 
> Drop the leading underscore, we don't do that.
> 
> > Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1497
> > +        index++;
> 
> This is fine but could use enumerateObjectsUsingBlock instead of manually keeping track of the index.

Will do
Comment 7 chris fleizach 2013-05-06 22:17:25 PDT
Created attachment 200871 [details]
patch
Comment 8 Build Bot 2013-05-06 22:30:10 PDT
Comment on attachment 200871 [details]
patch

Attachment 200871 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/281312
Comment 9 chris fleizach 2013-05-06 22:48:43 PDT
Created attachment 200873 [details]
patch
Comment 10 Build Bot 2013-05-06 23:15:05 PDT
Comment on attachment 200873 [details]
patch

Attachment 200873 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/328251
Comment 11 chris fleizach 2013-05-06 23:25:01 PDT
Created attachment 200875 [details]
patch
Comment 12 Build Bot 2013-05-06 23:32:03 PDT
Comment on attachment 200875 [details]
patch

Attachment 200875 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/325273
Comment 13 Build Bot 2013-05-07 00:06:23 PDT
Comment on attachment 200875 [details]
patch

Attachment 200875 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/431251
Comment 14 chris fleizach 2013-05-07 09:16:24 PDT
Created attachment 200913 [details]
patch
Comment 15 Tim Horton 2013-06-01 13:32:36 PDT
Comment on attachment 200913 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=200913&action=review

ok

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:3774
> +                postscriptPair.first = postscriptPair.second = 0;

We don't do this.
Comment 16 chris fleizach 2013-06-03 12:35:09 PDT
http://trac.webkit.org/changeset/151123