Bug 120552 - AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
Summary: AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: chris fleizach
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-08-30 14:53 PDT by James Craig
Modified: 2013-09-10 12:19 PDT (History)
16 users (show)

See Also:


Attachments
patch (50.57 KB, patch)
2013-09-09 17:01 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch (60.24 KB, patch)
2013-09-09 17:07 PDT, chris fleizach
darin: review+
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 (466.66 KB, application/zip)
2013-09-09 17:54 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion (498.77 KB, application/zip)
2013-09-09 18:21 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (505.32 KB, application/zip)
2013-09-09 19:22 PDT, Build Bot
no flags Details
patch for build fixes (67.71 KB, patch)
2013-09-10 10:18 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch for build fixes (60.08 KB, patch)
2013-09-10 10:23 PDT, chris fleizach
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
patch for build fixes (60.09 KB, patch)
2013-09-10 10:36 PDT, chris fleizach
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2013-08-30 14:53:22 PDT
AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
Comment 1 Radar WebKit Bug Importer 2013-08-30 14:53:56 PDT
<rdar://problem/14883149>
Comment 2 chris fleizach 2013-09-09 17:01:14 PDT
Created attachment 211120 [details]
patch
Comment 3 chris fleizach 2013-09-09 17:07:21 PDT
Created attachment 211122 [details]
patch
Comment 4 Early Warning System Bot 2013-09-09 17:19:06 PDT
Comment on attachment 211122 [details]
patch

Attachment 211122 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1726732
Comment 5 Early Warning System Bot 2013-09-09 17:25:09 PDT
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
Comment 6 chris fleizach 2013-09-09 17:46:28 PDT
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 7 Build Bot 2013-09-09 17:54:10 PDT
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
Comment 8 Build Bot 2013-09-09 17:54:12 PDT
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 9 Build Bot 2013-09-09 18:21:40 PDT
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
Comment 10 Build Bot 2013-09-09 18:21:43 PDT
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 11 Build Bot 2013-09-09 19:22:30 PDT
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
Comment 12 Build Bot 2013-09-09 19:22:33 PDT
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 13 EFL EWS Bot 2013-09-09 19:42:29 PDT
Comment on attachment 211122 [details]
patch

Attachment 211122 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/1732580
Comment 14 Darin Adler 2013-09-09 22:46:17 PDT
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 15 kov's GTK+ EWS bot 2013-09-09 22:54:40 PDT
Comment on attachment 211122 [details]
patch

Attachment 211122 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/1729637
Comment 16 chris fleizach 2013-09-10 00:39:15 PDT
(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
Comment 17 chris fleizach 2013-09-10 10:18:48 PDT
Created attachment 211211 [details]
patch for build fixes
Comment 18 chris fleizach 2013-09-10 10:23:22 PDT
Created attachment 211212 [details]
patch for build fixes
Comment 19 Early Warning System Bot 2013-09-10 10:33:38 PDT
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
Comment 20 chris fleizach 2013-09-10 10:36:05 PDT
Created attachment 211214 [details]
patch for build fixes
Comment 21 chris fleizach 2013-09-10 11:32:28 PDT
http://trac.webkit.org/changeset/155458
Comment 22 Tim Horton 2013-09-10 12:15:56 PDT
(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'
Comment 23 chris fleizach 2013-09-10 12:16:54 PDT
(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
Comment 24 chris fleizach 2013-09-10 12:19:09 PDT
http://trac.webkit.org/changeset/155463