<!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>[175654] 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/175654">175654</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2014-11-05 18:16:09 -0800 (Wed, 05 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: add &quot;alt&quot; as an overriding synonym of &quot;-webkit-alt&quot; (now in the CSS4 spec)
https://bugs.webkit.org/show_bug.cgi?id=138393

Reviewed by Dean Jackson.

Source/WebCore:

Add official &quot;alt&quot; CSS keyword and map -webkit-alt to that.

Test: platform/mac/accessibility/alt-for-css-content.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

LayoutTests:

* platform/mac/accessibility/alt-for-css-content-expected.txt: Added.
* platform/mac/accessibility/alt-for-css-content.html: 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="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityaltforcsscontentexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityaltforcsscontenthtml">trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (175653 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-11-06 01:53:25 UTC (rev 175653)
+++ trunk/LayoutTests/ChangeLog        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-11-05  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: add &quot;alt&quot; as an overriding synonym of &quot;-webkit-alt&quot; (now in the CSS4 spec)
+        https://bugs.webkit.org/show_bug.cgi?id=138393
+
+        Reviewed by Dean Jackson.
+
+        * platform/mac/accessibility/alt-for-css-content-expected.txt: Added.
+        * platform/mac/accessibility/alt-for-css-content.html: Added.
+
</ins><span class="cx"> 2014-11-05  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove the unused deletion UI feature
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityaltforcsscontentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content-expected.txt (0 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content-expected.txt        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+This tests that alt (formerly known as -webkit-alt) applies to text and image content in CSS styles, and that it makes it to accessibility.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Test1 - alt on image content with attr() function
+AXRole: AXImage
+AXDescription: ALTERNATIVE CONTENT TEST1
+AXTitle: 
+AXValue: 
+
+Test2 - alt on image content that is a string
+AXRole: AXImage
+AXDescription: ALTERNATIVE CONTENT TEST2
+AXTitle: 
+AXValue: 
+
+Test3 - alt on image content that is an empty string - representing that it should be ignored.
+AXRole: 
+AXDescription: 
+AXTitle: 
+AXValue: 
+
+Test4 - alt on text content
+AXRole: AXStaticText
+AXDescription: 
+AXTitle: 
+AXValue: ALTERNATIVE CONTENT TEST4
+
+Test5 - alt on text content that is an empty string - representing that is should be ignored.
+AXRole: AXStaticText
+AXDescription: 
+AXTitle: 
+AXValue: test5
+
+Test6 - alt on text content that uses the attr() function.
+AXRole: AXStaticText
+AXDescription: 
+AXTitle: 
+AXValue: ALTERNATIVE CONTENT TEST6
+
+alt accessed through Javascript: 'ALTERNATIVE CONTENT TEST2'
+Test7 - alt does not apply to DOM nodes.
+AXRole: AXImage
+AXDescription: This is the right text
+AXTitle: 
+AXValue: 
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityaltforcsscontenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content.html (0 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/alt-for-css-content.html        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -0,0 +1,113 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;title id=&quot;title&quot;&gt;TITLE&lt;/title&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;style&gt;
+
+/* alt on image content with attr() function. */
+[test1]::after {
+    content: url(resources/cake.png);
+    alt: attr(test1);
+}
+
+/* alt on image content that is a string. */
+.test2::after {
+    content: url(resources/cake.png);
+    alt: &quot;ALTERNATIVE CONTENT TEST2&quot;;
+}
+
+/* alt on image content that is an empty string - representing that it should be ignored. */
+.test3::after {
+    content: url(resources/cake.png);
+    alt: &quot;&quot;;
+}
+
+/* alt on text content. */
+[aria-expanded=&quot;test4&quot;]::before {
+    content: &quot;\25BB&quot;;
+    alt: &quot;ALTERNATIVE CONTENT TEST4&quot;;
+}
+
+/* alt on text content that is an empty string - representing that is should be ignored. */
+[aria-expanded=&quot;test5&quot;]::before {
+    content: &quot;\25BC&quot;;
+    alt: &quot;&quot;;
+}
+
+/* alt on text content that uses the attr() function. */
+[aria-expanded=&quot;test6&quot;]::before {
+    content: &quot;\25BC&quot;;
+    alt: attr(test6);
+}
+&lt;/style&gt;
+
+&lt;div id=&quot;content&quot;&gt;
+&lt;div id=&quot;test1&quot; test1=&quot;ALTERNATIVE CONTENT TEST1&quot;&gt;test1&lt;/div&gt;
+&lt;div id=&quot;test2&quot; class=&quot;test2&quot;&gt;test2&lt;/div&gt;
+&lt;div id=&quot;test3&quot; class=&quot;test3&quot;&gt;test3&lt;/div&gt;
+&lt;div id=&quot;test4&quot; aria-expanded=&quot;test4&quot;&gt;test4&lt;/div&gt;
+&lt;div id=&quot;test5&quot; test5=&quot;ALTERNATIVE CONTENT TEST5&quot; aria-expanded=&quot;test5&quot;&gt;test5&lt;/div&gt;
+&lt;div id=&quot;test6&quot; test6=&quot;ALTERNATIVE CONTENT TEST6&quot; aria-expanded=&quot;test6&quot;&gt;test6&lt;/div&gt;
+
+&lt;img id=&quot;image1&quot; src=&quot;#&quot; alt=&quot;This is the right text&quot; style=&quot;width:100px; height:100px; -webkit-alt: 'this is the wrong text';&quot;&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 alt (formerly known as -webkit-alt) applies to text and image content in CSS styles, and that it makes it to accessibility.&quot;);
+    
+    function outputElement(element) {
+        var role = &quot;AXRole: &quot;;
+        var description = &quot;AXDescription: &quot;;
+        var title = &quot;AXTitle: &quot;;
+        var value = &quot;AXValue: &quot;;
+        if (element) {
+            role = element.role;
+            description = element.description;
+            title = element.title;
+            value = element.stringValue;
+        }
+        debug(role);
+        debug(description);
+        debug(title);
+        debug(value + &quot;\n&quot;);
+    }
+
+    if (window.accessibilityController) {
+        debug(&quot;Test1 - alt on image content with attr() function&quot;);
+        outputElement(accessibilityController.accessibleElementById(&quot;test1&quot;).childAtIndex(1));
+
+        debug(&quot;Test2 - alt on image content that is a string&quot;);
+        outputElement(accessibilityController.accessibleElementById(&quot;test2&quot;).childAtIndex(1));
+
+        debug(&quot;Test3 - alt on image content that is an empty string - representing that it should be ignored.&quot;);
+        outputElement(accessibilityController.accessibleElementById(&quot;test3&quot;).childAtIndex(1));
+
+        debug(&quot;Test4 - alt on text content&quot;);
+        outputElement(accessibilityController.accessibleElementById(&quot;test4&quot;).childAtIndex(0));
+
+        debug(&quot;Test5 - alt on text content that is an empty string - representing that is should be ignored.&quot;);
+        outputElement(accessibilityController.accessibleElementById(&quot;test5&quot;).childAtIndex(0));
+
+        debug(&quot;Test6 - alt on text content that uses the attr() function.&quot;);
+        outputElement(accessibilityController.accessibleElementById(&quot;test6&quot;).childAtIndex(0));
+
+        debug(&quot;alt accessed through Javascript: &quot; + getComputedStyle(document.getElementById(&quot;test2&quot;), ':after').alt);
+
+        debug(&quot;Test7 - alt does not apply to DOM nodes.&quot;);
+        outputElement(accessibilityController.accessibleElementById(&quot;image1&quot;));
+
+        document.getElementById(&quot;content&quot;).style.visibility = &quot;hidden&quot;;
+    }
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175653 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-06 01:53:25 UTC (rev 175653)
+++ trunk/Source/WebCore/ChangeLog        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-11-05  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: add &quot;alt&quot; as an overriding synonym of &quot;-webkit-alt&quot; (now in the CSS4 spec)
+        https://bugs.webkit.org/show_bug.cgi?id=138393
+
+        Reviewed by Dean Jackson.
+
+        Add official &quot;alt&quot; CSS keyword and map -webkit-alt to that.
+
+        Test: platform/mac/accessibility/alt-for-css-content.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSPropertyNames.in:
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::applyProperty):
+
</ins><span class="cx"> 2014-11-05  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, EFL build fix since r175647
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (175653 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-11-06 01:53:25 UTC (rev 175653)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -91,6 +91,7 @@
</span><span class="cx"> 
</span><span class="cx"> // List of all properties we know how to compute, omitting shorthands.
</span><span class="cx"> static const CSSPropertyID computedProperties[] = {
</span><ins>+    CSSPropertyAlt,
</ins><span class="cx">     CSSPropertyBackgroundAttachment,
</span><span class="cx">     CSSPropertyBackgroundBlendMode,
</span><span class="cx">     CSSPropertyBackgroundClip,
</span><span class="lines">@@ -224,7 +225,6 @@
</span><span class="cx">     CSSPropertyZIndex,
</span><span class="cx">     CSSPropertyZoom,
</span><span class="cx"> 
</span><del>-    CSSPropertyWebkitAlt,
</del><span class="cx">     CSSPropertyWebkitAnimationDelay,
</span><span class="cx">     CSSPropertyWebkitAnimationDirection,
</span><span class="cx">     CSSPropertyWebkitAnimationDuration,
</span><span class="lines">@@ -2840,7 +2840,7 @@
</span><span class="cx">             return CSSPrimitiveValue::create(style-&gt;textOrientation());
</span><span class="cx">         case CSSPropertyWebkitLineBoxContain:
</span><span class="cx">             return createLineBoxContainValue(style-&gt;lineBoxContain());
</span><del>-        case CSSPropertyWebkitAlt:
</del><ins>+        case CSSPropertyAlt:
</ins><span class="cx">             return altTextToCSSValue(style.get());
</span><span class="cx">         case CSSPropertyContent:
</span><span class="cx">             return contentToCSSValue(style.get());
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (175653 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-11-06 01:53:25 UTC (rev 175653)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -1867,7 +1867,7 @@
</span><span class="cx">         // close-quote | no-open-quote | no-close-quote ]+ | inherit
</span><span class="cx">         return parseContent(propId, important);
</span><span class="cx"> 
</span><del>-    case CSSPropertyWebkitAlt: // [ &lt;string&gt; | attr(X) ]
</del><ins>+    case CSSPropertyAlt: // [ &lt;string&gt; | attr(X) ]
</ins><span class="cx">         return parseAlt(propId, important);
</span><span class="cx">             
</span><span class="cx">     case CSSPropertyClip:                 // &lt;shape&gt; | auto | inherit
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (175653 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2014-11-06 01:53:25 UTC (rev 175653)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -256,7 +256,8 @@
</span><span class="cx"> word-spacing [Inherited]
</span><span class="cx"> word-wrap [Inherited, NewStyleBuilder=EOverflowWrap, NameForMethods=OverflowWrap]
</span><span class="cx"> z-index
</span><del>--webkit-alt
</del><ins>+alt
+-webkit-alt = alt
</ins><span class="cx"> -webkit-animation
</span><span class="cx"> -webkit-animation-delay
</span><span class="cx"> -webkit-animation-direction
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (175653 => 175654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-11-06 01:53:25 UTC (rev 175653)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-11-06 02:16:09 UTC (rev 175654)
</span><span class="lines">@@ -2230,7 +2230,7 @@
</span><span class="cx">                 state.style()-&gt;clearContent();
</span><span class="cx">             return;
</span><span class="cx">         }
</span><del>-    case CSSPropertyWebkitAlt:
</del><ins>+    case CSSPropertyAlt:
</ins><span class="cx">         {
</span><span class="cx">             bool didSet = false;
</span><span class="cx">             if (primitiveValue-&gt;isString()) {
</span></span></pre>
</div>
</div>

</body>
</html>