Title: [178829] branches/safari-600.1.4.15-branch

Diff

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog (178828 => 178829)


--- branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog	2015-01-21 18:06:43 UTC (rev 178828)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog	2015-01-21 18:20:32 UTC (rev 178829)
@@ -1,5 +1,23 @@
 2015-01-21  Babak Shafiei  <[email protected]>
 
+        Merge r176318.
+
+    2014-11-19  Chris Fleizach  <[email protected]>
+
+            AX: Screen braille input doesn't work on forms.
+            https://bugs.webkit.org/show_bug.cgi?id=138804
+
+            Reviewed by Mario Sanchez Prada.
+
+            Allow iOS to set values of text fields through the API.
+
+            Test: platform/ios-sim/accessibility/set-value.html
+
+            * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+            (-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):
+
+2015-01-21  Babak Shafiei  <[email protected]>
+
         Merge r176285.
 
     2014-11-18  Myles C. Maxfield  <[email protected]>

Modified: branches/safari-600.1.4.15-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (178828 => 178829)


--- branches/safari-600.1.4.15-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2015-01-21 18:06:43 UTC (rev 178828)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2015-01-21 18:20:32 UTC (rev 178829)
@@ -1625,6 +1625,13 @@
     return YES;
 }
 
+- (void)_accessibilitySetValue:(NSString *)string
+{
+    if (![self _prepareAccessibilityCall])
+        return;
+    m_object->setValue(string);
+}
+
 - (NSString *)stringForTextMarkers:(NSArray *)markers
 {
     if (![self _prepareAccessibilityCall])

Modified: branches/safari-600.1.4.15-branch/Tools/ChangeLog (178828 => 178829)


--- branches/safari-600.1.4.15-branch/Tools/ChangeLog	2015-01-21 18:06:43 UTC (rev 178828)
+++ branches/safari-600.1.4.15-branch/Tools/ChangeLog	2015-01-21 18:20:32 UTC (rev 178829)
@@ -1,3 +1,25 @@
+2015-01-21  Babak Shafiei  <[email protected]>
+
+        Merge r176318.
+
+    2014-11-19  Chris Fleizach  <[email protected]>
+
+            AX: Screen braille input doesn't work on forms.
+            https://bugs.webkit.org/show_bug.cgi?id=138804
+
+            Reviewed by Mario Sanchez Prada.
+
+            Add a method to setValue through the AX API in DRT.
+
+            * DumpRenderTree/AccessibilityUIElement.cpp:
+            (setValueCallback):
+            (AccessibilityUIElement::getJSClass):
+            * DumpRenderTree/AccessibilityUIElement.h:
+            * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+            (AccessibilityUIElement::setValue):
+            * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+            (AccessibilityUIElement::setValue):
+
 2015-01-20  Babak Shafiei  <[email protected]>
 
         Merge r174376.

Modified: branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/AccessibilityUIElement.cpp (178828 => 178829)


--- branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/AccessibilityUIElement.cpp	2015-01-21 18:06:43 UTC (rev 178828)
+++ branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/AccessibilityUIElement.cpp	2015-01-21 18:20:32 UTC (rev 178829)
@@ -436,6 +436,19 @@
     return JSValueMakeBoolean(context, toAXElement(thisObject)->isEqual(toAXElement(otherElement)));
 }
 
+static JSValueRef setValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    JSRetainPtr<JSStringRef> valueText = 0;
+    if (argumentCount == 1) {
+        if (JSValueIsString(context, arguments[0]))
+            valueText.adopt(JSValueToStringCopy(context, arguments[0], exception));
+    }
+    
+    toAXElement(thisObject)->setValue(valueText.get());
+    
+    return JSValueMakeUndefined(context);
+}
+
 static JSValueRef setSelectedChildCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     JSObjectRef element = 0;
@@ -1335,6 +1348,7 @@
 
 #if !PLATFORM(MAC) && !PLATFORM(IOS)
 JSStringRef AccessibilityUIElement::pathDescription() const { return 0; }
+void AccessibilityUIElement::setValue(JSStringRef);
 #endif
 
 #if !PLATFORM(COCOA)
@@ -1626,6 +1640,7 @@
         { "previousTextMarker", previousTextMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "stringForTextMarkerRange", stringForTextMarkerRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setSelectedChild", setSelectedChildCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "setValue", setValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "selectedChildAtIndex", selectedChildAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "scrollToMakeVisible", scrollToMakeVisibleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
 #if PLATFORM(GTK) || PLATFORM(EFL)

Modified: branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/AccessibilityUIElement.h (178828 => 178829)


--- branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/AccessibilityUIElement.h	2015-01-21 18:06:43 UTC (rev 178828)
+++ branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/AccessibilityUIElement.h	2015-01-21 18:20:32 UTC (rev 178829)
@@ -123,6 +123,7 @@
     JSStringRef language();
     JSStringRef stringValue();
     JSStringRef accessibilityValue() const;
+    void setValue(JSStringRef);
     JSStringRef helpText() const;
     JSStringRef orientation() const;
     double x();

Modified: branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (178828 => 178829)


--- branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2015-01-21 18:06:43 UTC (rev 178828)
+++ branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2015-01-21 18:20:32 UTC (rev 178829)
@@ -76,6 +76,7 @@
 - (void)accessibilitySetPostedNotificationCallback:(AXPostedNotificationCallback)function withContext:(void*)context;
 - (CGFloat)_accessibilityMinValue;
 - (CGFloat)_accessibilityMaxValue;
+- (void)_accessibilitySetValue:(NSString *)value;
 @end
 
 @interface NSObject (WebAccessibilityObjectWrapperPrivate)
@@ -526,6 +527,11 @@
     return [m_element _accessibilityMaxValue];
 }
 
+void AccessibilityUIElement::setValue(JSStringRef valueText)
+{
+    [m_element _accessibilitySetValue:[NSString stringWithJSStringRef:valueText]];
+}
+
 JSStringRef AccessibilityUIElement::valueDescription()
 {
     return JSStringCreateWithCharacters(0, 0);

Modified: branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (178828 => 178829)


--- branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm	2015-01-21 18:06:43 UTC (rev 178828)
+++ branches/safari-600.1.4.15-branch/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm	2015-01-21 18:20:32 UTC (rev 178829)
@@ -1343,6 +1343,13 @@
     END_AX_OBJC_EXCEPTIONS
 }
 
+void AccessibilityUIElement::setValue(JSStringRef valueText)
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    [m_element accessibilitySetValue:[NSString stringWithJSStringRef:valueText] forAttribute:NSAccessibilityValueAttribute];
+    END_AX_OBJC_EXCEPTIONS
+}
+
 void AccessibilityUIElement::increment()
 {
     BEGIN_AX_OBJC_EXCEPTIONS
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to