<!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>[151831] 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/151831">151831</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-06-21 03:33:34 -0700 (Fri, 21 Jun 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>[ATK] Added support for aria-required attribute.
https://bugs.webkit.org/show_bug.cgi?id=117730

Patch by Krzysztof Czech &lt;k.czech@samsung.com&gt; on 2013-06-21
Reviewed by Chris Fleizach.

Source/WebCore:

Tests: accessibility/aria-required.html
       accessibility/html5-required-attribute.html

The aria-required attribute is used to indicate that user input is required on an
element before a form can be submitted.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):

Tools:

Added support for testing aria-required attribute.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::isRequired):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::isRequired):

LayoutTests:

Moving specific platform accessibility tests.

* accessibility/aria-required-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-required-expected.txt.
* accessibility/aria-required.html: Renamed from LayoutTests/platform/mac/accessibility/aria-required.html.
* accessibility/html5-required-attribute-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt.
* accessibility/html5-required-attribute.html: Renamed from LayoutTests/platform/mac/accessibility/html5-required-attribute.html.</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="#trunkSourceWebCoreaccessibilityatkWebKitAccessibleWrapperAtkcpp">trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeatkAccessibilityUIElementAtkcpp">trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilityariarequiredexpectedtxt">trunk/LayoutTests/accessibility/aria-required-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityariarequiredhtml">trunk/LayoutTests/accessibility/aria-required.html</a></li>
<li><a href="#trunkLayoutTestsaccessibilityhtml5requiredattributeexpectedtxt">trunk/LayoutTests/accessibility/html5-required-attribute-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityhtml5requiredattributehtml">trunk/LayoutTests/accessibility/html5-required-attribute.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityariarequiredexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/aria-required-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityariarequiredhtml">trunk/LayoutTests/platform/mac/accessibility/aria-required.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityhtml5requiredattributeexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityhtml5requiredattributehtml">trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/LayoutTests/ChangeLog        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2013-06-21  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
+
+        [ATK] Added support for aria-required attribute.
+        https://bugs.webkit.org/show_bug.cgi?id=117730
+
+        Reviewed by Chris Fleizach.
+
+        Moving specific platform accessibility tests.
+
+        * accessibility/aria-required-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-required-expected.txt.
+        * accessibility/aria-required.html: Renamed from LayoutTests/platform/mac/accessibility/aria-required.html.
+        * accessibility/html5-required-attribute-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt.
+        * accessibility/html5-required-attribute.html: Renamed from LayoutTests/platform/mac/accessibility/html5-required-attribute.html.
+
</ins><span class="cx"> 2013-06-21  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IndieUI: Add basic IndieUI infrastructure
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityariarequiredexpectedtxtfromrev151830trunkLayoutTestsplatformmacaccessibilityariarequiredexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/accessibility/aria-required-expected.txt (from rev 151830, trunk/LayoutTests/platform/mac/accessibility/aria-required-expected.txt) (0 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/aria-required-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/aria-required-expected.txt        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+  
+This tests that aria-required is a usable attribute.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS succeeded is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilityariarequiredhtmlfromrev151830trunkLayoutTestsplatformmacaccessibilityariarequiredhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/accessibility/aria-required.html (from rev 151830, trunk/LayoutTests/platform/mac/accessibility/aria-required.html) (0 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/aria-required.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/aria-required.html        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../fast/js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+&lt;input type=&quot;text&quot; aria-required=&quot;true&quot; id=&quot;textfield1&quot;&gt;
+&lt;input type=&quot;text&quot; aria-required=&quot;false&quot; id=&quot;textfield2&quot;&gt;
+&lt;input type=&quot;text&quot; id=&quot;textfield3&quot;&gt;
+
+&lt;div id=&quot;toBeHidden&quot;&gt;
+
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;listbox&quot; id=&quot;lb1&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;listbox&quot; id=&quot;lb2&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; role=&quot;listbox&quot; id=&quot;lb3&quot;&gt;text&lt;/div&gt;
+
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;radiogroup&quot; id=&quot;rg1&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;radiogroup&quot; id=&quot;rg2&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; role=&quot;radiogroup&quot; id=&quot;rg3&quot;&gt;text&lt;/div&gt;
+
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;spinbutton&quot; id=&quot;sb1&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;spinbutton&quot; id=&quot;sb2&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; role=&quot;spinbutton&quot; id=&quot;sb3&quot;&gt;text&lt;/div&gt;
+
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;tree&quot; id=&quot;t1&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;tree&quot; id=&quot;t2&quot;&gt;text&lt;/div&gt;
+  &lt;div tabindex=&quot;0&quot; role=&quot;tree&quot; id=&quot;t3&quot;&gt;text&lt;/div&gt;
+
+&lt;/div&gt;
+
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;This tests that aria-required is a usable attribute.&quot;);
+
+    function $(id){
+      return document.getElementById(id);
+    }
+
+    if (window.accessibilityController) {
+
+          var succeeded = false;
+
+          // textfield 1 is required
+          $(&quot;textfield1&quot;).focus();
+          succeeded = accessibilityController.focusedElement.isRequired;
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          // textfield 2 and 3 are not required
+          $(&quot;textfield2&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          $(&quot;textfield3&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+
+          // listbox 1 is required
+          $(&quot;lb1&quot;).focus();
+          succeeded = accessibilityController.focusedElement.isRequired;
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          // listbox 2 and 3 are not required
+          $(&quot;lb2&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          $(&quot;lb3&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+
+          // radiogroup 1 is required
+          $(&quot;rg1&quot;).focus();
+          succeeded = accessibilityController.focusedElement.isRequired;
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          // radiogroup 2 and 3 are not required
+          $(&quot;rg2&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          $(&quot;rg3&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+
+          // spinbutton 1 is required
+          $(&quot;sb1&quot;).focus();
+          succeeded = accessibilityController.focusedElement.isRequired;
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          // spinbutton 2 and 3 are not required
+          $(&quot;sb2&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          $(&quot;sb3&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+
+          // tree 1 is required
+          $(&quot;t1&quot;).focus();
+          succeeded = accessibilityController.focusedElement.isRequired;
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          // tree 2 and 3 are not required
+          $(&quot;t2&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+          $(&quot;t3&quot;).focus();
+          succeeded = !(accessibilityController.focusedElement.isRequired);
+          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
+
+    }
+
+    $('toBeHidden').hidden = true; // hide this to avoid text diffs when adding more elements to the test
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../fast/js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilityhtml5requiredattributeexpectedtxtfromrev151830trunkLayoutTestsplatformmacaccessibilityhtml5requiredattributeexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/accessibility/html5-required-attribute-expected.txt (from rev 151830, trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt) (0 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/html5-required-attribute-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/html5-required-attribute-expected.txt        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+
+This tests that the required attribute is returned correctly through accessibility.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS accessibilityController.focusedElement.isRequired is true
+PASS accessibilityController.focusedElement.isRequired is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilityhtml5requiredattributehtmlfromrev151830trunkLayoutTestsplatformmacaccessibilityhtml5requiredattributehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/accessibility/html5-required-attribute.html (from rev 151830, trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute.html) (0 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/html5-required-attribute.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/html5-required-attribute.html        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../fast/js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+
+&lt;input type=&quot;text&quot; id=&quot;text1&quot; required&gt;
+
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;This tests that the required attribute is returned correctly through accessibility.&quot;);
+
+    if (window.accessibilityController) {
+
+        document.getElementById(&quot;text1&quot;).focus();
+        shouldBeTrue(&quot;accessibilityController.focusedElement.isRequired&quot;);
+
+        document.getElementById(&quot;text1&quot;).removeAttribute(&quot;required&quot;);
+        shouldBeFalse(&quot;accessibilityController.focusedElement.isRequired&quot;);
+
+    }
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../fast/js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityariarequiredexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/accessibility/aria-required-expected.txt (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/aria-required-expected.txt        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-required-expected.txt        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-  
-This tests that aria-required is a usable attribute.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS succeeded is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityariarequiredhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/accessibility/aria-required.html (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/aria-required.html        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-required.html        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -1,115 +0,0 @@
</span><del>-&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../../fast/js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body id=&quot;body&quot;&gt;
-
-&lt;input type=&quot;text&quot; aria-required=&quot;true&quot; id=&quot;textfield1&quot;&gt;
-&lt;input type=&quot;text&quot; aria-required=&quot;false&quot; id=&quot;textfield2&quot;&gt;
-&lt;input type=&quot;text&quot; id=&quot;textfield3&quot;&gt;
-
-&lt;div id=&quot;toBeHidden&quot;&gt;
-
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;listbox&quot; id=&quot;lb1&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;listbox&quot; id=&quot;lb2&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; role=&quot;listbox&quot; id=&quot;lb3&quot;&gt;text&lt;/div&gt;
-
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;radiogroup&quot; id=&quot;rg1&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;radiogroup&quot; id=&quot;rg2&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; role=&quot;radiogroup&quot; id=&quot;rg3&quot;&gt;text&lt;/div&gt;
-
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;spinbutton&quot; id=&quot;sb1&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;spinbutton&quot; id=&quot;sb2&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; role=&quot;spinbutton&quot; id=&quot;sb3&quot;&gt;text&lt;/div&gt;
-
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;true&quot; role=&quot;tree&quot; id=&quot;t1&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; aria-required=&quot;false&quot; role=&quot;tree&quot; id=&quot;t2&quot;&gt;text&lt;/div&gt;
-  &lt;div tabindex=&quot;0&quot; role=&quot;tree&quot; id=&quot;t3&quot;&gt;text&lt;/div&gt;
-
-&lt;/div&gt;
-
-&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-
-&lt;script&gt;
-
-    description(&quot;This tests that aria-required is a usable attribute.&quot;);
-
-    function $(id){
-      return document.getElementById(id);
-    }
-
-    if (window.accessibilityController) {
-
-          var succeeded = false;
-
-          // textfield 1 is required
-          $(&quot;textfield1&quot;).focus();
-          succeeded = accessibilityController.focusedElement.isRequired;
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          // textfield 2 and 3 are not required
-          $(&quot;textfield2&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          $(&quot;textfield3&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-
-          // listbox 1 is required
-          $(&quot;lb1&quot;).focus();
-          succeeded = accessibilityController.focusedElement.isRequired;
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          // listbox 2 and 3 are not required
-          $(&quot;lb2&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          $(&quot;lb3&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-
-          // radiogroup 1 is required
-          $(&quot;rg1&quot;).focus();
-          succeeded = accessibilityController.focusedElement.isRequired;
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          // radiogroup 2 and 3 are not required
-          $(&quot;rg2&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          $(&quot;rg3&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-
-          // spinbutton 1 is required
-          $(&quot;sb1&quot;).focus();
-          succeeded = accessibilityController.focusedElement.isRequired;
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          // spinbutton 2 and 3 are not required
-          $(&quot;sb2&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          $(&quot;sb3&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-
-          // tree 1 is required
-          $(&quot;t1&quot;).focus();
-          succeeded = accessibilityController.focusedElement.isRequired;
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          // tree 2 and 3 are not required
-          $(&quot;t2&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-          $(&quot;t3&quot;).focus();
-          succeeded = !(accessibilityController.focusedElement.isRequired);
-          shouldBe(&quot;succeeded&quot;, &quot;true&quot;);
-
-    }
-
-    $('toBeHidden').hidden = true; // hide this to avoid text diffs when adding more elements to the test
-
-&lt;/script&gt;
-
-&lt;script src=&quot;../../../fast/js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityhtml5requiredattributeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute-expected.txt        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -1,12 +0,0 @@
</span><del>-
-This tests that the required attribute is returned correctly through accessibility.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS accessibilityController.focusedElement.isRequired is true
-PASS accessibilityController.focusedElement.isRequired is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityhtml5requiredattributehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute.html (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute.html        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/LayoutTests/platform/mac/accessibility/html5-required-attribute.html        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -1,32 +0,0 @@
</span><del>-&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../../fast/js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body id=&quot;body&quot;&gt;
-
-
-&lt;input type=&quot;text&quot; id=&quot;text1&quot; required&gt;
-
-&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-
-&lt;script&gt;
-
-    description(&quot;This tests that the required attribute is returned correctly through accessibility.&quot;);
-
-    if (window.accessibilityController) {
-
-        document.getElementById(&quot;text1&quot;).focus();
-        shouldBeTrue(&quot;accessibilityController.focusedElement.isRequired&quot;);
-
-        document.getElementById(&quot;text1&quot;).removeAttribute(&quot;required&quot;);
-        shouldBeFalse(&quot;accessibilityController.focusedElement.isRequired&quot;);
-
-    }
-
-&lt;/script&gt;
-
-&lt;script src=&quot;../../../fast/js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/Source/WebCore/ChangeLog        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2013-06-21  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
+
+        [ATK] Added support for aria-required attribute.
+        https://bugs.webkit.org/show_bug.cgi?id=117730
+
+        Reviewed by Chris Fleizach.
+
+        Tests: accessibility/aria-required.html
+               accessibility/html5-required-attribute.html
+
+        The aria-required attribute is used to indicate that user input is required on an
+        element before a form can be submitted.
+
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (setAtkStateSetFromCoreObject):
+
</ins><span class="cx"> 2013-06-21  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IndieUI: Add basic IndieUI infrastructure
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityatkWebKitAccessibleWrapperAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -712,6 +712,9 @@
</span><span class="cx">     if (coreObject-&gt;isPressed())
</span><span class="cx">         atk_state_set_add_state(stateSet, ATK_STATE_PRESSED);
</span><span class="cx"> 
</span><ins>+    if (coreObject-&gt;isRequired())
+        atk_state_set_add_state(stateSet, ATK_STATE_REQUIRED);
+
</ins><span class="cx">     // TODO: ATK_STATE_SELECTABLE_TEXT
</span><span class="cx"> 
</span><span class="cx">     if (coreObject-&gt;canSetSelectedAttribute()) {
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/Tools/ChangeLog        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2013-06-21  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
+
+        [ATK] Added support for aria-required attribute.
+        https://bugs.webkit.org/show_bug.cgi?id=117730
+
+        Reviewed by Chris Fleizach.
+
+        Added support for testing aria-required attribute.
+
+        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+        (AccessibilityUIElement::isRequired):
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::isRequired):
+
</ins><span class="cx"> 2013-06-20  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CMAKE][EFL] Enable DOM4 Events Constructor
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -581,8 +581,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityUIElement::isRequired() const
</span><span class="cx"> {
</span><del>-    // FIXME: implement
-    return false;
</del><ins>+    return checkElementState(m_element, ATK_STATE_REQUIRED);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityUIElement::isFocused() const
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (151830 => 151831)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2013-06-21 09:36:05 UTC (rev 151830)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2013-06-21 10:33:34 UTC (rev 151831)
</span><span class="lines">@@ -761,8 +761,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityUIElement::isRequired() const
</span><span class="cx"> {
</span><del>-    // FIXME: implement
-    return false;
</del><ins>+    return checkElementState(m_element.get(), ATK_STATE_REQUIRED);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilityUIElement::isFocused() const
</span></span></pre>
</div>
</div>

</body>
</html>