<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[168042] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/168042">168042</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2014-04-30 13:47:16 -0700 (Wed, 30 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>AX: Make "contenteditable" regions into AXTextAreas
https://bugs.webkit.org/show_bug.cgi?id=132379
Reviewed by Mario Sanchez Prada.
Source/WebCore:
Make contenteditable regions into AXTextAreas. This will allow for a more standardized
interface for interaction with assistive technologies.
Test: accessibility/content-editable-as-textarea.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange):
(WebCore::AccessibilityRenderObject::selectedText):
(WebCore::AccessibilityRenderObject::selectedTextRange):
(WebCore::AccessibilityRenderObject::renderObjectIsObservable):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::ariaSelectedTextRange): Deleted.
* accessibility/AccessibilityRenderObject.h:
LayoutTests:
* accessibility/content-editable-as-textarea.html: Added.
* platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt: Added.
* platform/mac/accessibility/content-editable-as-textarea-expected.txt: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjecth">trunk/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjecth">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitycontenteditableastextareahtml">trunk/LayoutTests/accessibility/content-editable-as-textarea.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitycontenteditableastextareaexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/content-editable-as-textarea-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmountainlionaccessibilitycontenteditableastextareaexpectedtxt">trunk/LayoutTests/platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (168041 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-30 20:42:19 UTC (rev 168041)
+++ trunk/LayoutTests/ChangeLog        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-04-30 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Make "contenteditable" regions into AXTextAreas
+ https://bugs.webkit.org/show_bug.cgi?id=132379
+
+ Reviewed by Mario Sanchez Prada.
+
+ * accessibility/content-editable-as-textarea.html: Added.
+ * platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt: Added.
+ * platform/mac/accessibility/content-editable-as-textarea-expected.txt: Added.
+
</ins><span class="cx"> 2014-04-30 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> Move iphone-simulator test results landed in r167402 to the correct directory
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitycontenteditableastextareahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/content-editable-as-textarea.html (0 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/content-editable-as-textarea.html         (rev 0)
+++ trunk/LayoutTests/accessibility/content-editable-as-textarea.html        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<div id="content" contenteditable tabindex="0">
+hello<br>
+<b>world</b>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that a contenteditable region behaves as a proper AXTextArea.");
+
+ var notification = 0;
+ var textArea = 0;
+ function callback(notification) {
+ if (notification == "AXValueChanged") {
+ textArea.removeNotificationListener();
+ debug("Updated value: " + textArea.stringValue);
+ document.getElementById("content").style.visibility = "hidden";
+ finishJSTest();
+ }
+ }
+
+ if (window.accessibilityController) {
+ window.jsTestIsAsync = true;
+
+ textArea = accessibilityController.accessibleElementById("content");
+ textArea.addNotificationListener(callback);
+
+ debug("Role: " + textArea.role);
+ debug("Value: " + textArea.stringValue);
+ debug("Value (writable): " + textArea.isAttributeSettable("AXValue"));
+ debug("String with range: " + textArea.stringForRange(1, 9));
+ debug("Attributed string with range: " + textArea.attributedStringForRange(1, 9));
+ debug("Line for index(0): " + textArea.lineForIndex(0));
+ debug("Line for index(7): " + textArea.lineForIndex(7));
+ debug("Range for line(0): " + textArea.rangeForLine(0));
+ debug("Range for line(1): " + textArea.rangeForLine(1));
+ debug("Bounds for range: " + textArea.boundsForRange(3, 5));
+
+ var range = document.createRange();
+ range.setStart(document.getElementById("content").firstChild, 0);
+ range.setEnd(document.getElementById("content").firstChild, 4);
+ var sel = window.getSelection();
+ sel.addRange(range);
+
+ debug("Selected text range: " + textArea.selectedTextRange);
+ debug("Selected text: " + textArea.stringAttributeValue("AXSelectedText"));
+
+ // Send a value cahnge.
+ document.getElementById("content").focus();
+ eventSender.keyDown('q', []);
+ }
+
+</script>
+
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitycontenteditableastextareaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/content-editable-as-textarea-expected.txt (0 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/content-editable-as-textarea-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/content-editable-as-textarea-expected.txt        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+
+This tests that a contenteditable region behaves as a proper AXTextArea.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Role: AXRole: AXTextArea
+Value: AXValue: hello
+world
+Value (writable): true
+String with range: ello
+worl
+Attributed string with range: ello
+{
+ AXBackgroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 0 )";
+ AXFont = {
+ AXFontFamily = Times;
+ AXFontName = "Times-Roman";
+ AXFontSize = 16;
+ AXVisibleName = "Times Roman";
+ };
+ AXForegroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 1 )";
+}worl{
+ AXBackgroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 0 )";
+ AXFont = {
+ AXFontFamily = Times;
+ AXFontName = "Times-Bold";
+ AXFontSize = 16;
+ AXVisibleName = "Times Bold";
+ };
+ AXForegroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 1 )";
+ AXMarkedMisspelled = 1;
+ AXMisspelled = 1;
+}
+Line for index(0): 0
+Line for index(7): 1
+Range for line(0): {0, 6}
+Range for line(1): {6, 6}
+Bounds for range: {{-1.000000, -1.000000}, {31.000000, 36.000000}}
+Selected text range: {0, 3}
+Selected text: hel
+Updated value: AXValue: qlo
+world
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacmountainlionaccessibilitycontenteditableastextareaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt (0 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+
+This tests that a contenteditable region behaves as a proper AXTextArea.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Role: AXRole: AXTextArea
+Value: AXValue: hello
+world
+Value (writable): true
+String with range: ello
+worl
+Attributed string with range: ello
+{
+ AXBackgroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 0 )";
+ AXFont = {
+ AXFontFamily = Times;
+ AXFontName = "Times-Roman";
+ AXFontSize = 16;
+ AXVisibleName = "Times Roman";
+ };
+ AXForegroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 1 )";
+}worl{
+ AXBackgroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 0 )";
+ AXFont = {
+ AXFontFamily = Times;
+ AXFontName = "Times-Bold";
+ AXFontSize = 16;
+ AXVisibleName = "Times Bold";
+ };
+ AXForegroundColor = " [ (kCGColorSpaceDeviceRGB)] ( 0 0 0 1 )";
+ AXMisspelled = 1;
+}
+Line for index(0): 0
+Line for index(7): 1
+Range for line(0): {0, 6}
+Range for line(1): {6, 6}
+Bounds for range: {{-1.000000, -1.000000}, {31.000000, 36.000000}}
+Selected text range: {0, 3}
+Selected text: hel
+Updated value: AXValue: qlo
+world
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168041 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-30 20:42:19 UTC (rev 168041)
+++ trunk/Source/WebCore/ChangeLog        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2014-04-29 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Make "contenteditable" regions into AXTextAreas
+ https://bugs.webkit.org/show_bug.cgi?id=132379
+
+ Reviewed by Mario Sanchez Prada.
+
+ Make contenteditable regions into AXTextAreas. This will allow for a more standardized
+ interface for interaction with assistive technologies.
+
+ Test: accessibility/content-editable-as-textarea.html
+
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange):
+ (WebCore::AccessibilityRenderObject::selectedText):
+ (WebCore::AccessibilityRenderObject::selectedTextRange):
+ (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+ (WebCore::AccessibilityRenderObject::ariaSelectedTextRange): Deleted.
+ * accessibility/AccessibilityRenderObject.h:
+
</ins><span class="cx"> 2014-04-30 Brian J. Burg <burg@cs.washington.edu>
</span><span class="cx">
</span><span class="cx"> Clean up unnecessary methods in the BackForwardClient interface
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (168041 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-04-30 20:42:19 UTC (rev 168041)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -2012,11 +2012,7 @@
</span><span class="cx"> // This only returns true if this is the element that actually has the contentEditable attribute set.
</span><span class="cx"> bool AccessibilityNodeObject::hasContentEditableAttributeSet() const
</span><span class="cx"> {
</span><del>- if (!hasAttribute(contenteditableAttr))
- return false;
- const AtomicString& contentEditableValue = getAttribute(contenteditableAttr);
- // Both "true" (case-insensitive) and the empty string count as true.
- return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableValue, "true");
</del><ins>+ return contentEditableAttributeIsEnabled(element());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool AccessibilityNodeObject::canSetSelectedAttribute() const
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (168041 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-04-30 20:42:19 UTC (rev 168041)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -1314,7 +1314,20 @@
</span><span class="cx">
</span><span class="cx"> return obj->document().axObjectCache()->getOrCreate(obj);
</span><span class="cx"> }
</span><del>-
</del><ins>+
+bool AccessibilityObject::contentEditableAttributeIsEnabled(Element* element)
+{
+ if (!element)
+ return false;
+
+ if (!element->hasAttribute(contenteditableAttr))
+ return false;
+
+ const AtomicString& contentEditableValue = element->fastGetAttribute(contenteditableAttr);
+ // Both "true" (case-insensitive) and the empty string count as true.
+ return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableValue, "true");
+}
+
</ins><span class="cx"> #if HAVE(ACCESSIBILITY)
</span><span class="cx"> int AccessibilityObject::lineForPosition(const VisiblePosition& visiblePos) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (168041 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-04-30 20:42:19 UTC (rev 168041)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -843,6 +843,7 @@
</span><span class="cx"> virtual bool ariaLiveRegionBusy() const { return false; }
</span><span class="cx"> static const String defaultLiveRegionStatusForRole(AccessibilityRole);
</span><span class="cx"> static bool liveRegionStatusIsEnabled(const AtomicString&);
</span><ins>+ static bool contentEditableAttributeIsEnabled(Element*);
</ins><span class="cx">
</span><span class="cx"> bool supportsARIAAttributes() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (168041 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-04-30 20:42:19 UTC (rev 168041)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -1420,7 +1420,7 @@
</span><span class="cx"> return text().length();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlainTextRange AccessibilityRenderObject::ariaSelectedTextRange() const
</del><ins>+PlainTextRange AccessibilityRenderObject::documentBasedSelectedTextRange() const
</ins><span class="cx"> {
</span><span class="cx"> Node* node = m_renderer->node();
</span><span class="cx"> if (!node)
</span><span class="lines">@@ -1449,10 +1449,7 @@
</span><span class="cx"> return textControl.selectedText();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (ariaRoleAttribute() == UnknownRole)
- return String();
-
- return doAXStringForRange(ariaSelectedTextRange());
</del><ins>+ return doAXStringForRange(documentBasedSelectedTextRange());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const AtomicString& AccessibilityRenderObject::accessKey() const
</span><span class="lines">@@ -1483,10 +1480,7 @@
</span><span class="cx"> return PlainTextRange(textControl.selectionStart(), textControl.selectionEnd() - textControl.selectionStart());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (ariaRole == UnknownRole)
- return PlainTextRange();
-
- return ariaSelectedTextRange();
</del><ins>+ return documentBasedSelectedTextRange();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AccessibilityRenderObject::setSelectedTextRange(const PlainTextRange& range)
</span><span class="lines">@@ -2394,11 +2388,14 @@
</span><span class="cx">
</span><span class="cx"> // AX clients will listen for AXSelectedChildrenChanged on listboxes.
</span><span class="cx"> Node* node = renderer->node();
</span><ins>+ if (!node)
+ return false;
+
</ins><span class="cx"> if (nodeHasRole(node, "listbox") || (renderer->isBoxModelObject() && toRenderBoxModelObject(renderer)->isListBox()))
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // Textboxes should send out notifications.
</span><del>- if (nodeHasRole(node, "textbox"))
</del><ins>+ if (nodeHasRole(node, "textbox") || (node->isElementNode() && contentEditableAttributeIsEnabled(toElement(node))))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> return false;
</span><span class="lines">@@ -2510,7 +2507,10 @@
</span><span class="cx"> return ColorWellRole;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><del>-
</del><ins>+
+ if (hasContentEditableAttributeSet())
+ return TextAreaRole;
+
</ins><span class="cx"> if (isFileUploadButton())
</span><span class="cx"> return ButtonRole;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h (168041 => 168042)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h        2014-04-30 20:42:19 UTC (rev 168041)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h        2014-04-30 20:47:16 UTC (rev 168042)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> bool isAllowedChildOfTree() const;
</span><span class="cx"> bool hasTextAlternative() const;
</span><span class="cx"> String positionalDescriptionForMSAA() const;
</span><del>- PlainTextRange ariaSelectedTextRange() const;
</del><ins>+ PlainTextRange documentBasedSelectedTextRange() const;
</ins><span class="cx"> Element* rootEditableElementForPosition(const Position&) const;
</span><span class="cx"> bool nodeIsTextControl(const Node*) const;
</span><span class="cx"> virtual void setNeedsToUpdateChildren() override { m_childrenDirty = true; }
</span></span></pre>
</div>
</div>
</body>
</html>