AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
<rdar://problem/14883149>
Created attachment 211120 [details] patch
Created attachment 211122 [details] patch
Comment on attachment 211122 [details] patch Attachment 211122 [details] did not pass qt-ews (qt): Output: http://webkit-queues.appspot.com/results/1726732
Comment on attachment 211122 [details] patch Attachment 211122 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1734463
Anyone from QT knows why this succeeds on the other platforms but not QT? /home/webkit/WebKit/Source/WTF/wtf/Vector.h:1044:9: error: call of overloaded 'String(const WTF::AtomicString&)' is ambiguous /home/webkit/WebKit/Source/WTF/wtf/Vector.h:1044:9: note: candidates are: /home/webkit/WebKit/Source/WTF/wtf/text/WTFString.h:427:44: note: WTF::String::String(const QString&) /home/webkit/WebKit/Source/WTF/wtf/text/WTFString.h:145:5: note: WTF::String::String(WTF::String&&) /home/webkit/WebKit/Source/WTF/wtf/text/WTFString.h:144:5: note: WTF::String::String(const WTF::String&) /home/webkit/WebKit/Source/WTF/wtf/Vector.h: In member function 'void WTF::Vector<T, inlineCapacity, OverflowHandler>::appendSlowCase(const U&) [with U = WTF::AtomicString, T = WTF::String, long unsigned int inlineCapacity = 0ul, OverflowHandler = WTF::CrashOnOverflow]': /home/webkit/WebKit/Source/WTF/wtf/Vector.h:1049:5: instantiated from 'void WTF::Vector<T, inlineCapacity, OverflowHandler>::append(const U&) [with U = WTF::AtomicString, T = WTF::String, long unsigned int inlineCapacity = 0ul, OverflowHandler = WTF::CrashOnOverflow]' /home/webkit/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp:1669:39: instantiated from here /home/webkit/WebKit/Source/WTF/wtf/Vector.h:1062:5: error: call of overloaded 'String(const WTF::AtomicString&)' is ambiguous /home/webkit/WebKit/Source/WTF/wtf/Vector.h:1062:5: note: candidates are: /home/webkit/WebKit/Source/WTF/wtf/text/WTFString.h:427:44: note: WTF::String::String(const QString&) /home/webkit/WebKit/Source/WTF/wtf/text/WTFString.h:145:5: note: WTF::String::String(WTF::String&&) /home/webkit/WebKit/Source/WTF/wtf/text/WTFString.h:144:5: note: WTF::String::String(const WTF::String&)
Comment on attachment 211122 [details] patch Attachment 211122 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1738267 New failing tests: accessibility/lists.html
Created attachment 211127 [details] Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Comment on attachment 211122 [details] patch Attachment 211122 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1742215 New failing tests: accessibility/lists.html
Created attachment 211128 [details] Archive of layout-test-results from webkit-ews-03 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Comment on attachment 211122 [details] patch Attachment 211122 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1731556 New failing tests: accessibility/lists.html
Created attachment 211137 [details] Archive of layout-test-results from webkit-ews-07 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Comment on attachment 211122 [details] patch Attachment 211122 [details] did not pass efl-ews (efl): Output: http://webkit-queues.appspot.com/results/1732580
Comment on attachment 211122 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=211122&action=review Looks OK, but not building on most platforms. Are you sure we want to export the class list as a single comma-separated string? > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1508 > +static NSMutableArray *convertStringsToNSArray(const Vector<String>& vector) > +{ > + size_t length = vector.size(); > + NSMutableArray *array = [NSMutableArray arrayWithCapacity:length]; > + for (size_t i = 0; i < length; ++i) > + [array addObject:vector[i]]; > + return array; > +} Would be nice to share our implementation of this. There are lots of copies of it in different classes in WebKit. > Source/WebCore/accessibility/AccessibilityObject.h:548 > + String domIdentifier() const; > + void domClassList(Vector<String>&) const; Why the “dom” prefix on these? > Source/WebCore/accessibility/AccessibilityObject.cpp:1654 > + return getAttribute(idAttr); fastGetAttribute
Comment on attachment 211122 [details] patch Attachment 211122 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1729637
(In reply to comment #14) > (From update of attachment 211122 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=211122&action=review > > Looks OK, but not building on most platforms. > > Are you sure we want to export the class list as a single comma-separated string? > The class list will be exposed as a NSArray of strings through the AX interface. It's only in DRT that we're turning it into a comma-delimited string (for easier testing) > > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1508 > > +static NSMutableArray *convertStringsToNSArray(const Vector<String>& vector) > > +{ > > + size_t length = vector.size(); > > + NSMutableArray *array = [NSMutableArray arrayWithCapacity:length]; > > + for (size_t i = 0; i < length; ++i) > > + [array addObject:vector[i]]; > > + return array; > > +} > > Would be nice to share our implementation of this. There are lots of copies of it in different classes in WebKit. I'll see if there's an easy way to factor this out > > > Source/WebCore/accessibility/AccessibilityObject.h:548 > > + String domIdentifier() const; > > + void domClassList(Vector<String>&) const; > > Why the “dom” prefix on these? No good reason. I will remove > > > Source/WebCore/accessibility/AccessibilityObject.cpp:1654 > > + return getAttribute(idAttr); > > fastGetAttribute Thanks for the review
Created attachment 211211 [details] patch for build fixes
Created attachment 211212 [details] patch for build fixes
Comment on attachment 211212 [details] patch for build fixes Attachment 211212 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1728766
Created attachment 211214 [details] patch for build fixes
http://trac.webkit.org/changeset/155458
(In reply to comment #21) > http://trac.webkit.org/changeset/155458 I think this broke the windows build: http://build.webkit.org/builders/Apple%20Win%20Debug%20%28Build%29/builds/70084/steps/compile-webkit/logs/stdio 1>..\..\win\AccessibilityUIElementWin.cpp(838): error C2511: 'JSStringRef AccessibilityUIElement::classList(void)' : overloaded member function not found in 'AccessibilityUIElement' c:\cygwin\home\buildbot\slave\win-debug\build\tools\dumprendertree\AccessibilityUIElement.h(64) : see declaration of 'AccessibilityUIElement'
(In reply to comment #22) > (In reply to comment #21) > > http://trac.webkit.org/changeset/155458 > > I think this broke the windows build: http://build.webkit.org/builders/Apple%20Win%20Debug%20%28Build%29/builds/70084/steps/compile-webkit/logs/stdio > > 1>..\..\win\AccessibilityUIElementWin.cpp(838): error C2511: 'JSStringRef AccessibilityUIElement::classList(void)' : overloaded member function not found in 'AccessibilityUIElement' > c:\cygwin\home\buildbot\slave\win-debug\build\tools\dumprendertree\AccessibilityUIElement.h(64) : see declaration of 'AccessibilityUIElement' I'm on it thanks
http://trac.webkit.org/changeset/155463