Unreviewed, rolling out r218633.
authorjlewis3@apple.com <jlewis3@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jun 2017 16:33:55 +0000 (16:33 +0000)
committerjlewis3@apple.com <jlewis3@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jun 2017 16:33:55 +0000 (16:33 +0000)
The test is failing frequently on Sierra Debug and Windows

Reverted changeset:

"AX: Cannot call setValue() on contenteditable or ARIA text
controls"
https://bugs.webkit.org/show_bug.cgi?id=173520
http://trac.webkit.org/changeset/218633

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218702 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/set-value-editable-types-expected.txt [deleted file]
LayoutTests/accessibility/set-value-editable-types.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

index 8382929..e19e019 100644 (file)
@@ -1,3 +1,16 @@
+2017-06-22  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r218633.
+
+        The test is failing frequently on Sierra Debug and Windows
+
+        Reverted changeset:
+
+        "AX: Cannot call setValue() on contenteditable or ARIA text
+        controls"
+        https://bugs.webkit.org/show_bug.cgi?id=173520
+        http://trac.webkit.org/changeset/218633
+
 2017-06-22  Romain Bellessort  <romain.bellessort@crf.canon.fr>
 
         [Readable Streams API] Implement ReadableStreamBYOBReader read()
diff --git a/LayoutTests/accessibility/set-value-editable-types-expected.txt b/LayoutTests/accessibility/set-value-editable-types-expected.txt
deleted file mode 100644 (file)
index da5307d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-This tests that you can set the value of a contenteditable element.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-Contenteditable
-Role: AXRole: AXTextArea
-Value: AXValue: current1
-Writable: true
-Updated value: AXValue: new value
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/accessibility/set-value-editable-types.html b/LayoutTests/accessibility/set-value-editable-types.html
deleted file mode 100644 (file)
index daf7320..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body id="body">
-<script src="../resources/js-test-pre.js"></script>
-<div id="content">
-
-<div contenteditable="true" id="contenteditable">current1</div>
-
-</div>
-
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-
-    description("This tests that you can set the value of a contenteditable element.");
-
-    if (window.accessibilityController) {
-        jsTestIsAsync = true;
-        function testElement(idValue, completion) {
-            var axElement = accessibilityController.accessibleElementById(idValue);
-            debug("Role: " + axElement.role);
-            debug("Value: " + axElement.stringValue);
-        
-            var writable = axElement.isAttributeSettable("AXValue");
-            debug("Writable: " + writable);
-
-            axElement.setValue("new value");
-
-            // setting attributes can be done after a dispatch.
-            window.setTimeout(function() {
-               debug("Updated value: " + axElement.stringValue);
-               completion();
-            }, 10);
-        }
-
-        debug("\nContenteditable");
-        testElement("contenteditable", function() {    
-            document.getElementById("content").style.visibility = "hidden";
-            finishJSTest();
-        });
-    } else {
-        testFailed("Could not load accessibility controller");
-    }
-
-</script>
-
-<script src="../resources/js-test-post.js"></script>
-</body>
-</html>
index a96ad1d..73ff226 100644 (file)
@@ -1,3 +1,16 @@
+2017-06-22  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r218633.
+
+        The test is failing frequently on Sierra Debug and Windows
+
+        Reverted changeset:
+
+        "AX: Cannot call setValue() on contenteditable or ARIA text
+        controls"
+        https://bugs.webkit.org/show_bug.cgi?id=173520
+        http://trac.webkit.org/changeset/218633
+
 2017-06-22  Romain Bellessort  <romain.bellessort@crf.canon.fr>
 
         [Readable Streams API] Implement ReadableStreamBYOBReader read()
index 4f0dd0e..0a8bfe2 100644 (file)
@@ -1743,15 +1743,16 @@ void AccessibilityRenderObject::setValue(const String& string)
     if (!m_renderer || !is<Element>(m_renderer->node()))
         return;
     Element& element = downcast<Element>(*m_renderer->node());
-    RenderObject& renderer = *m_renderer;
-    
+
+    if (!is<RenderBoxModelObject>(*m_renderer))
+        return;
+    RenderBoxModelObject& renderer = downcast<RenderBoxModelObject>(*m_renderer);
+
     // FIXME: Do we want to do anything here for ARIA textboxes?
     if (renderer.isTextField() && is<HTMLInputElement>(element))
         downcast<HTMLInputElement>(element).setValue(string);
     else if (renderer.isTextArea() && is<HTMLTextAreaElement>(element))
         downcast<HTMLTextAreaElement>(element).setValue(string);
-    else if (is<HTMLElement>(element) && contentEditableAttributeIsEnabled(&element))
-        downcast<HTMLElement>(element).setInnerText(string);
 }
 
 bool AccessibilityRenderObject::supportsARIAOwns() const
index 5f4a94b..6de069a 100644 (file)
@@ -1,3 +1,16 @@
+2017-06-22  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r218633.
+
+        The test is failing frequently on Sierra Debug and Windows
+
+        Reverted changeset:
+
+        "AX: Cannot call setValue() on contenteditable or ARIA text
+        controls"
+        https://bugs.webkit.org/show_bug.cgi?id=173520
+        http://trac.webkit.org/changeset/218633
+
 2017-06-22  David Kilzer  <ddkilzer@apple.com>
 
         [TestWebKitAPI] Fix misuse of -[NSData dataWithBytesNoCopy:length:] with global variables
index 95cd26a..25814e4 100644 (file)
@@ -89,7 +89,6 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::sentenceAtOffset(int) { return
 RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::selectedTextMarkerRange() { return nullptr; }
 void AccessibilityUIElement::resetSelectedTextMarkerRange() { }
 void AccessibilityUIElement::setBoolAttributeValue(JSStringRef, bool) { }
-void AccessibilityUIElement::setValue(JSStringRef) { }
 #endif
 
 #if !PLATFORM(COCOA) || !HAVE(ACCESSIBILITY)
index ceac49e..4dfdbdd 100644 (file)
@@ -110,7 +110,6 @@ public:
     bool isPressActionSupported();
     bool isIncrementActionSupported();
     bool isDecrementActionSupported();
-    void setValue(JSStringRef);
     JSRetainPtr<JSStringRef> role();
     JSRetainPtr<JSStringRef> subrole();
     JSRetainPtr<JSStringRef> roleDescription();
index 8b9820a..c50d68f 100644 (file)
@@ -69,7 +69,6 @@ interface AccessibilityUIElement {
     boolean isPressActionSupported();
     boolean isIncrementActionSupported();
     boolean isDecrementActionSupported();
-    void setValue(DOMString value);
 
     readonly attribute DOMString stringValue;
     readonly attribute long intValue;
index 4a97a81..a4966af 100644 (file)
@@ -589,14 +589,7 @@ void AccessibilityUIElement::setBoolAttributeValue(JSStringRef attribute, bool v
     [m_element _accessibilitySetTestValue:@(value) forAttribute:[NSString stringWithJSStringRef:attribute]];
     END_AX_OBJC_EXCEPTIONS
 }
-    
-void AccessibilityUIElement::setValue(JSStringRef value)
-{
-    BEGIN_AX_OBJC_EXCEPTIONS
-    [m_element accessibilitySetValue:[NSString stringWithJSStringRef:value] forAttribute:NSAccessibilityValueAttribute];
-    END_AX_OBJC_EXCEPTIONS
-}
-    
+
 bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
 {
     BEGIN_AX_OBJC_EXCEPTIONS