Bug 128397

Summary: AX: Add text replacement activity support to NSAccessibilitySelectTextWithCriteriaParameterizedAttribute.
Product: WebKit Reporter: Samuel White <samuel_white>
Component: AccessibilityAssignee: Samuel White <samuel_white>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, buildbot, cfleizach, commit-queue, dmazzoni, jcraig, jdiggs, mario, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.9   
Attachments:
Description Flags
Patch.
none
Updated patch.
cfleizach: review+
Updated patch to fix build issues.
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2
none
More build fixing.
none
Updated patch to fix more build issues.
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion
none
Fixed patch. cfleizach: review+

Description Samuel White 2014-02-07 14:12:40 PST
The above parameterized attribute should support the NSAccessibilitySelectTextActivityFindAndReplace activity.
Comment 1 Radar WebKit Bug Importer 2014-02-07 14:13:06 PST
<rdar://problem/16015807>
Comment 2 Samuel White 2014-02-10 14:23:48 PST
Created attachment 223745 [details]
Patch.
Comment 3 Samuel White 2014-02-10 14:32:50 PST
Created attachment 223750 [details]
Updated patch.

Fixing small bit of faulty logic.
Comment 4 Samuel White 2014-02-10 15:26:13 PST
Created attachment 223753 [details]
Updated patch to fix build issues.
Comment 5 Build Bot 2014-02-10 16:02:33 PST
Comment on attachment 223753 [details]
Updated patch to fix build issues.

Attachment 223753 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5947622191792128

New failing tests:
editing/unsupported-content/list-type-before.html
editing/unsupported-content/table-type-before.html
editing/unsupported-content/list-delete-001.html
platform/mac/accessibility/select-text.html
editing/unsupported-content/list-type-after.html
editing/unsupported-content/table-type-after.html
Comment 6 Build Bot 2014-02-10 16:02:35 PST
Created attachment 223760 [details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-09  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 7 Samuel White 2014-02-10 16:22:18 PST
Created attachment 223764 [details]
More build fixing.
Comment 8 Samuel White 2014-02-10 17:02:41 PST
Created attachment 223771 [details]
Updated patch to fix more build issues.
Comment 9 Build Bot 2014-02-10 19:14:51 PST
Comment on attachment 223771 [details]
Updated patch to fix more build issues.

Attachment 223771 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6744245880750080

New failing tests:
platform/mac/accessibility/select-text.html
Comment 10 Build Bot 2014-02-10 19:14:53 PST
Created attachment 223791 [details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 11 Build Bot 2014-02-10 19:29:36 PST
Comment on attachment 223771 [details]
Updated patch to fix more build issues.

Attachment 223771 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6259113621192704

New failing tests:
platform/mac/accessibility/select-text.html
Comment 12 Build Bot 2014-02-10 19:29:39 PST
Created attachment 223793 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 13 Build Bot 2014-02-10 20:27:04 PST
Comment on attachment 223771 [details]
Updated patch to fix more build issues.

Attachment 223771 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5015626099720192

New failing tests:
platform/mac/accessibility/select-text.html
Comment 14 Build Bot 2014-02-10 20:27:06 PST
Created attachment 223801 [details]
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-02  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 15 Samuel White 2014-02-10 22:03:22 PST
Created attachment 223807 [details]
Fixed patch.
Comment 16 Samuel White 2014-02-11 09:40:17 PST
Comment on attachment 223807 [details]
Fixed patch.

Fixed up the build issues. Should be good to go.
Comment 17 chris fleizach 2014-02-11 09:54:00 PST
Comment on attachment 223807 [details]
Fixed patch.

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

> Source/WebCore/accessibility/AccessibilityObject.h:406
> +    AccessibilitySelectTextCriteria(AccessibilitySelectTextActivity activity, AccessibilitySelectTextAmbiguityResolution ambiguityResolution, String replacementString)

I think this can be const String&, since we're going to copy it anyway with , replacementString(replacementString)

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:637
> +        if ([activityParameter isEqualToString:NSAccessibilitySelectTextActivityFindAndReplace])

you can probably put this if statement together with the one above
Comment 18 Samuel White 2014-02-11 12:13:15 PST
(In reply to comment #17)
> (From update of attachment 223807 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223807&action=review
> 
> > Source/WebCore/accessibility/AccessibilityObject.h:406
> > +    AccessibilitySelectTextCriteria(AccessibilitySelectTextActivity activity, AccessibilitySelectTextAmbiguityResolution ambiguityResolution, String replacementString)
> 
> I think this can be const String&, since we're going to copy it anyway with , replacementString(replacementString)

Seems like a good optimization to me.

> 
> > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:637
> > +        if ([activityParameter isEqualToString:NSAccessibilitySelectTextActivityFindAndReplace])
> 
> you can probably put this if statement together with the one above

They are separate because each new activity will be a new if statement. See the other parameter handling around it.

I'll add the above optimization and commit directly. Thanks!
Comment 19 Samuel White 2014-02-11 12:42:28 PST
Patch landed:

http://trac.webkit.org/changeset/163899

Closing bug.