Diff
Modified: trunk/LayoutTests/ChangeLog (168426 => 168427)
--- trunk/LayoutTests/ChangeLog 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/LayoutTests/ChangeLog 2014-05-07 16:17:47 UTC (rev 168427)
@@ -1,3 +1,13 @@
+2014-05-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: AXSelectTextWithCriteria should support capitalize/lowercase/uppercase
+ https://bugs.webkit.org/show_bug.cgi?id=132622
+
+ Reviewed by Mario Sanchez Prada.
+
+ * platform/mac/accessibility/select-text-expected.txt:
+ * platform/mac/accessibility/select-text.html:
+
2014-05-07 Grzegorz Czajkowski <g.czajkow...@samsung.com>
Share mac/editing/spelling/editing-multiple-words-with-markers.html with other platforms
Modified: trunk/LayoutTests/platform/mac/accessibility/select-text-expected.txt (168426 => 168427)
--- trunk/LayoutTests/platform/mac/accessibility/select-text-expected.txt 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/LayoutTests/platform/mac/accessibility/select-text-expected.txt 2014-05-07 16:17:47 UTC (rev 168427)
@@ -1,4 +1,4 @@
-The slow brown cat jumps over the lazy dog.
+The slow BROWN cat jumps over the lazy dog.
This tests the ability to select and replace text with respect to selection.
@@ -21,6 +21,12 @@
PASS selection is 'slow'
PASS result is 'fox'
PASS selection is 'cat'
+PASS result is 'brown'
+PASS selection is 'Brown'
+PASS result is 'Brown'
+PASS selection is 'brown'
+PASS result is 'brown'
+PASS selection is 'BROWN'
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/platform/mac/accessibility/select-text.html (168426 => 168427)
--- trunk/LayoutTests/platform/mac/accessibility/select-text.html 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/LayoutTests/platform/mac/accessibility/select-text.html 2014-05-07 16:17:47 UTC (rev 168427)
@@ -88,6 +88,28 @@
shouldBe("result", "'fox'");
selection = selectedText();
shouldBe("selection", "'cat'");
+
+ // Select brown and capitalize it.
+ selectElementText(target);
+ result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "brown", null, "AXSelectTextActivityFindAndCapitalize");
+ shouldBe("result", "'brown'");
+ selection = selectedText();
+ shouldBe("selection", "'Brown'");
+
+ // Select Brown and lowercase it.
+ selectElementText(target);
+ result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "Brown", null, "AXSelectTextActivityFindAndLowercase");
+ shouldBe("result", "'Brown'");
+ selection = selectedText();
+ shouldBe("selection", "'brown'");
+
+ // Select brown and uppercase it.
+ selectElementText(target);
+ result = text.selectTextWithCriteria("AXSelectTextAmbiguityResolutionClosestToSelection", "brown", null, "AXSelectTextActivityFindAndUppercase");
+ shouldBe("result", "'brown'");
+ selection = selectedText();
+ shouldBe("selection", "'BROWN'");
+
}
</script>
Modified: trunk/Source/WebCore/ChangeLog (168426 => 168427)
--- trunk/Source/WebCore/ChangeLog 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Source/WebCore/ChangeLog 2014-05-07 16:17:47 UTC (rev 168427)
@@ -1,3 +1,24 @@
+2014-05-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: AXSelectTextWithCriteria should support capitalize/lowercase/uppercase
+ https://bugs.webkit.org/show_bug.cgi?id=132622
+
+ Reviewed by Mario Sanchez Prada.
+
+ The select text with criteria mechanism used through accessibility needs to support
+ a few more parameters to be complete (including capitalize, lowercase and uppercase).
+
+ Updated: accessibility/select-text.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::selectText):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
+ * rendering/RenderText.cpp:
+ (WebCore::makeCapitalized):
+ * rendering/RenderText.h:
+
2014-05-07 pe...@outlook.com <pe...@outlook.com>
DocumentLoader::dataReceived assertion failed
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (168426 => 168427)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2014-05-07 16:17:47 UTC (rev 168427)
@@ -54,6 +54,7 @@
#include "RenderListItem.h"
#include "RenderListMarker.h"
#include "RenderMenuList.h"
+#include "RenderText.h"
#include "RenderTextControl.h"
#include "RenderTheme.h"
#include "RenderView.h"
@@ -629,14 +630,33 @@
// Determine which candidate is closest to the selection and perform the activity.
if (RefPtr<Range> closestStringRange = rangeClosestToRange(selectedStringRange.get(), closestAfterStringRange, closestBeforeStringRange)) {
String closestString = closestStringRange->text();
+ bool replaceSelection = false;
if (frame->selection().setSelectedRange(closestStringRange.get(), DOWNSTREAM, true)) {
switch (activity) {
+ case FindAndCapitalize: {
+ replacementString = closestString;
+ makeCapitalized(&replacementString, 0);
+ replaceSelection = true;
+ break;
+ }
+ case FindAndUppercase:
+ replacementString = closestString.upper();
+ replaceSelection = true;
+ break;
+ case FindAndLowercase:
+ replacementString = closestString.lower();
+ replaceSelection = true;
+ break;
case FindAndReplaceActivity:
- frame->editor().replaceSelectionWithText(replacementString, true, true);
- FALLTHROUGH;
+ replaceSelection = true;
+ break;
case FindAndSelectActivity:
- return closestString;
+ break;
}
+
+ if (replaceSelection)
+ frame->editor().replaceSelectionWithText(replacementString, true, true);
+ return closestString;
}
}
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (168426 => 168427)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2014-05-07 16:17:47 UTC (rev 168427)
@@ -391,7 +391,10 @@
enum AccessibilitySelectTextActivity {
FindAndReplaceActivity,
- FindAndSelectActivity
+ FindAndSelectActivity,
+ FindAndCapitalize,
+ FindAndLowercase,
+ FindAndUppercase
};
enum AccessibilitySelectTextAmbiguityResolution {
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (168426 => 168427)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2014-05-07 16:17:47 UTC (rev 168427)
@@ -404,6 +404,18 @@
#define NSAccessibilitySelectTextActivityFindAndSelect @"AXSelectTextActivityFindAndSelect"
#endif
+#ifndef kAXSelectTextActivityFindAndCapitalize
+#define kAXSelectTextActivityFindAndCapitalize @"AXSelectTextActivityFindAndCapitalize"
+#endif
+
+#ifndef kAXSelectTextActivityFindAndLowercase
+#define kAXSelectTextActivityFindAndLowercase @"AXSelectTextActivityFindAndLowercase"
+#endif
+
+#ifndef kAXSelectTextActivityFindAndUppercase
+#define kAXSelectTextActivityFindAndUppercase @"AXSelectTextActivityFindAndUppercase"
+#endif
+
#ifndef NSAccessibilitySelectTextAmbiguityResolution
#define NSAccessibilitySelectTextAmbiguityResolution @"AXSelectTextAmbiguityResolution"
#endif
@@ -662,6 +674,12 @@
if ([activityParameter isKindOfClass:[NSString class]]) {
if ([activityParameter isEqualToString:NSAccessibilitySelectTextActivityFindAndReplace])
activity = FindAndReplaceActivity;
+ else if ([activityParameter isEqualToString:kAXSelectTextActivityFindAndCapitalize])
+ activity = FindAndCapitalize;
+ else if ([activityParameter isEqualToString:kAXSelectTextActivityFindAndLowercase])
+ activity = FindAndLowercase;
+ else if ([activityParameter isEqualToString:kAXSelectTextActivityFindAndUppercase])
+ activity = FindAndUppercase;
}
AccessibilitySelectTextAmbiguityResolution ambiguityResolution = ClosestToSelectionAmbiguityResolution;
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (168426 => 168427)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2014-05-07 16:17:47 UTC (rev 168427)
@@ -111,7 +111,7 @@
return map;
}
-static void makeCapitalized(String* string, UChar previous)
+void makeCapitalized(String* string, UChar previous)
{
// FIXME: Need to change this to use u_strToTitle instead of u_totitle and to consider locale.
Modified: trunk/Source/WebCore/rendering/RenderText.h (168426 => 168427)
--- trunk/Source/WebCore/rendering/RenderText.h 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Source/WebCore/rendering/RenderText.h 2014-05-07 16:17:47 UTC (rev 168427)
@@ -242,7 +242,8 @@
}
void applyTextTransform(const RenderStyle&, String&, UChar);
-
+void makeCapitalized(String*, UChar previous);
+
inline RenderText* Text::renderer() const
{
return toRenderText(Node::renderer());
Modified: trunk/Tools/ChangeLog (168426 => 168427)
--- trunk/Tools/ChangeLog 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/ChangeLog 2014-05-07 16:17:47 UTC (rev 168427)
@@ -1,3 +1,35 @@
+2014-05-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: AXSelectTextWithCriteria should support capitalize/lowercase/uppercase
+ https://bugs.webkit.org/show_bug.cgi?id=132622
+
+ Reviewed by Mario Sanchez Prada.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (selectTextWithCriteriaCallback):
+ (isEqualCallback):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+ (AccessibilityUIElement::selectTextWithCriteria):
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::selectTextWithCriteria):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (selectTextParameterizedAttributeForCriteria):
+ (AccessibilityUIElement::selectTextWithCriteria):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::selectTextWithCriteria):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR::AccessibilityUIElement::selectTextWithCriteria):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::selectTextWithCriteria):
+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+ (WTR::AccessibilityUIElement::selectTextWithCriteria):
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::selectTextParameterizedAttributeForCriteria):
+ (WTR::AccessibilityUIElement::selectTextWithCriteria):
+
2014-05-07 Carlos Garcia Campos <cgar...@igalia.com>
[SOUP] TLSErrors do not cause page load to fail when not ignored
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (168426 => 168427)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp 2014-05-07 16:17:47 UTC (rev 168427)
@@ -260,7 +260,7 @@
static JSValueRef selectTextWithCriteriaCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- if (argumentCount < 2 || argumentCount > 3)
+ if (argumentCount < 2 || argumentCount > 4)
return JSValueMakeUndefined(context);
JSRetainPtr<JSStringRef> ambiguityResolution(Adopt, JSValueToStringCopy(context, arguments[0], exception));
@@ -268,8 +268,11 @@
JSStringRef replacementString = nullptr;
if (argumentCount == 3)
replacementString = JSValueToStringCopy(context, arguments[2], exception);
+ JSStringRef activityString = nullptr;
+ if (argumentCount == 4)
+ activityString = JSValueToStringCopy(context, arguments[3], exception);
- JSRetainPtr<JSStringRef> result(Adopt, toAXElement(thisObject)->selectTextWithCriteria(context, ambiguityResolution.get(), searchStrings, replacementString));
+ JSRetainPtr<JSStringRef> result(Adopt, toAXElement(thisObject)->selectTextWithCriteria(context, ambiguityResolution.get(), searchStrings, replacementString, activityString));
if (replacementString)
JSStringRelease(replacementString);
return JSValueMakeString(context, result.get());
Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (168426 => 168427)
--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h 2014-05-07 16:17:47 UTC (rev 168427)
@@ -212,7 +212,7 @@
bool attributedStringRangeIsMisspelled(unsigned location, unsigned length);
unsigned uiElementCountForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly);
AccessibilityUIElement uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly);
- JSStringRef selectTextWithCriteria(JSContextRef, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString);
+ JSStringRef selectTextWithCriteria(JSContextRef, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity);
#if PLATFORM(IOS)
void elementsForRange(unsigned location, unsigned length, Vector<AccessibilityUIElement>& elements);
JSStringRef stringForSelection();
Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (168426 => 168427)
--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp 2014-05-07 16:17:47 UTC (rev 168427)
@@ -1305,7 +1305,7 @@
return nullptr;
}
-JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
// FIXME: implement
return nullptr;
Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (168426 => 168427)
--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm 2014-05-07 16:17:47 UTC (rev 168427)
@@ -828,7 +828,7 @@
return 0;
}
-JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
// FIXME: Implement.
return nullptr;
Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (168426 => 168427)
--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2014-05-07 16:17:47 UTC (rev 168427)
@@ -247,7 +247,7 @@
return parameterizedAttribute;
}
-static NSDictionary *selectTextParameterizedAttributeForCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+static NSDictionary *selectTextParameterizedAttributeForCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
NSMutableDictionary *parameterizedAttribute = [NSMutableDictionary dictionary];
@@ -285,6 +285,9 @@
} else
[parameterizedAttribute setObject:@"AXSelectTextActivityFindAndSelect" forKey:@"AXSelectTextActivity"];
+ if (activity)
+ [parameterizedAttribute setObject:[NSString stringWithJSStringRef:activity] forKey:@"AXSelectTextActivity"];
+
return parameterizedAttribute;
}
@@ -1111,10 +1114,10 @@
return nullptr;
}
-JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
BEGIN_AX_OBJC_EXCEPTIONS
- NSDictionary *parameterizedAttribute = selectTextParameterizedAttributeForCriteria(context, ambiguityResolution, searchStrings, replacementString);
+ NSDictionary *parameterizedAttribute = selectTextParameterizedAttributeForCriteria(context, ambiguityResolution, searchStrings, replacementString, activity);
id result = [m_element accessibilityAttributeValue:@"AXSelectTextWithCriteria" forParameter:parameterizedAttribute];
if ([result isKindOfClass:[NSString class]])
return [result createJSStringRef];
Modified: trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp (168426 => 168427)
--- trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp 2014-05-07 16:17:47 UTC (rev 168427)
@@ -608,7 +608,7 @@
return 0;
}
-JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+JSStringRef AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
return 0;
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp (168426 => 168427)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp 2014-05-07 16:17:47 UTC (rev 168427)
@@ -178,7 +178,7 @@
bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned, unsigned) { return false; }
unsigned AccessibilityUIElement::uiElementCountForSearchPredicate(JSContextRef, AccessibilityUIElement*, bool, JSValueRef, JSStringRef, bool, bool) { return 0; }
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement*, bool, JSValueRef, JSStringRef, bool, bool) { return 0; }
-JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef, JSStringRef, JSValueRef, JSStringRef) { return nullptr; }
+JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef, JSStringRef, JSValueRef, JSStringRef, JSStringRef) { return nullptr; }
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::cellForColumnAndRow(unsigned, unsigned) { return 0; }
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::horizontalScrollbar() const { return 0; }
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::verticalScrollbar() const { return 0; }
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (168426 => 168427)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h 2014-05-07 16:17:47 UTC (rev 168427)
@@ -208,7 +208,7 @@
bool attributedStringRangeIsMisspelled(unsigned location, unsigned length);
unsigned uiElementCountForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly);
PassRefPtr<AccessibilityUIElement> uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly);
- JSRetainPtr<JSStringRef> selectTextWithCriteria(JSContextRef, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString);
+ JSRetainPtr<JSStringRef> selectTextWithCriteria(JSContextRef, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity);
// Text-specific
JSRetainPtr<JSStringRef> characterAtOffset(int offset);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (168426 => 168427)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl 2014-05-07 16:17:47 UTC (rev 168427)
@@ -160,7 +160,7 @@
boolean attributedStringRangeIsMisspelled(unsigned long location, unsigned long length);
[PassContext] unsigned int uiElementCountForSearchPredicate(AccessibilityUIElement startElement, boolean isDirectionNext, object searchKey, DOMString searchText, boolean visibleOnly, boolean immediateDescendantsOnly);
[PassContext] AccessibilityUIElement uiElementForSearchPredicate(AccessibilityUIElement startElement, boolean isDirectionNext, object searchKey, DOMString searchText, boolean visibleOnly, boolean immediateDescendantsOnly);
- [PassContext] DOMString selectTextWithCriteria(DOMString ambiguityResolution, object searchStrings, DOMString replacementString);
+ [PassContext] DOMString selectTextWithCriteria(DOMString ambiguityResolution, object searchStrings, DOMString replacementString, DOMString activity);
void setSelectedTextRange(unsigned long location, unsigned long length);
// Scroll area attributes.
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (168426 => 168427)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp 2014-05-07 16:17:47 UTC (rev 168427)
@@ -1460,7 +1460,7 @@
return nullptr;
}
-JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
// FIXME: implement
return nullptr;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (168426 => 168427)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2014-05-07 16:17:47 UTC (rev 168427)
@@ -478,7 +478,7 @@
return nullptr;
}
-JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
return nullptr;
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (168426 => 168427)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2014-05-07 14:54:56 UTC (rev 168426)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2014-05-07 16:17:47 UTC (rev 168427)
@@ -273,7 +273,7 @@
return parameterizedAttribute;
}
-static NSDictionary *selectTextParameterizedAttributeForCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+static NSDictionary *selectTextParameterizedAttributeForCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
NSMutableDictionary *parameterizedAttribute = [NSMutableDictionary dictionary];
@@ -311,6 +311,9 @@
} else
[parameterizedAttribute setObject:@"AXSelectTextActivityFindAndSelect" forKey:@"AXSelectTextActivity"];
+ if (activity)
+ [parameterizedAttribute setObject:[NSString stringWithJSStringRef:activity] forKey:@"AXSelectTextActivity"];
+
return parameterizedAttribute;
}
@@ -1167,10 +1170,10 @@
return nullptr;
}
-JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString)
+JSRetainPtr<JSStringRef> AccessibilityUIElement::selectTextWithCriteria(JSContextRef context, JSStringRef ambiguityResolution, JSValueRef searchStrings, JSStringRef replacementString, JSStringRef activity)
{
BEGIN_AX_OBJC_EXCEPTIONS
- NSDictionary *parameterizedAttribute = selectTextParameterizedAttributeForCriteria(context, ambiguityResolution, searchStrings, replacementString);
+ NSDictionary *parameterizedAttribute = selectTextParameterizedAttributeForCriteria(context, ambiguityResolution, searchStrings, replacementString, activity);
id result = [m_element accessibilityAttributeValue:@"AXSelectTextWithCriteria" forParameter:parameterizedAttribute];
if ([result isKindOfClass:[NSString class]])
return [result createJSStringRef];