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!
The best plan seems to be to return an array of dictionaries that specify the sub/superscript object
rdar://13687511
Created attachment 199389 [details] patch
Adding Tim to help with review
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.
(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
Created attachment 200871 [details] patch
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
Created attachment 200873 [details] patch
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
Created attachment 200875 [details] patch
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 on attachment 200875 [details] patch Attachment 200875 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/431251
Created attachment 200913 [details] patch
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.
http://trac.webkit.org/changeset/151123