<!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 "alt" as an overriding synonym of "-webkit-alt" (now in the CSS4 spec)
https://bugs.webkit.org/show_bug.cgi?id=138393
Reviewed by Dean Jackson.
Source/WebCore:
Add official "alt" 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 <cfleizach@apple.com>
+
+ AX: add "alt" as an overriding synonym of "-webkit-alt" (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 <mitz@apple.com>
</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 "PASS" messages, followed by "TEST COMPLETE".
+
+
+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>+<!DOCTYPE html>
+<html>
+<title id="title">TITLE</title>
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+
+<style>
+
+/* 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: "ALTERNATIVE CONTENT TEST2";
+}
+
+/* alt on image content that is an empty string - representing that it should be ignored. */
+.test3::after {
+ content: url(resources/cake.png);
+ alt: "";
+}
+
+/* alt on text content. */
+[aria-expanded="test4"]::before {
+ content: "\25BB";
+ alt: "ALTERNATIVE CONTENT TEST4";
+}
+
+/* alt on text content that is an empty string - representing that is should be ignored. */
+[aria-expanded="test5"]::before {
+ content: "\25BC";
+ alt: "";
+}
+
+/* alt on text content that uses the attr() function. */
+[aria-expanded="test6"]::before {
+ content: "\25BC";
+ alt: attr(test6);
+}
+</style>
+
+<div id="content">
+<div id="test1" test1="ALTERNATIVE CONTENT TEST1">test1</div>
+<div id="test2" class="test2">test2</div>
+<div id="test3" class="test3">test3</div>
+<div id="test4" aria-expanded="test4">test4</div>
+<div id="test5" test5="ALTERNATIVE CONTENT TEST5" aria-expanded="test5">test5</div>
+<div id="test6" test6="ALTERNATIVE CONTENT TEST6" aria-expanded="test6">test6</div>
+
+<img id="image1" src="#" alt="This is the right text" style="width:100px; height:100px; -webkit-alt: 'this is the wrong text';">
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("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.");
+
+ function outputElement(element) {
+ var role = "AXRole: ";
+ var description = "AXDescription: ";
+ var title = "AXTitle: ";
+ var value = "AXValue: ";
+ if (element) {
+ role = element.role;
+ description = element.description;
+ title = element.title;
+ value = element.stringValue;
+ }
+ debug(role);
+ debug(description);
+ debug(title);
+ debug(value + "\n");
+ }
+
+ if (window.accessibilityController) {
+ debug("Test1 - alt on image content with attr() function");
+ outputElement(accessibilityController.accessibleElementById("test1").childAtIndex(1));
+
+ debug("Test2 - alt on image content that is a string");
+ outputElement(accessibilityController.accessibleElementById("test2").childAtIndex(1));
+
+ debug("Test3 - alt on image content that is an empty string - representing that it should be ignored.");
+ outputElement(accessibilityController.accessibleElementById("test3").childAtIndex(1));
+
+ debug("Test4 - alt on text content");
+ outputElement(accessibilityController.accessibleElementById("test4").childAtIndex(0));
+
+ debug("Test5 - alt on text content that is an empty string - representing that is should be ignored.");
+ outputElement(accessibilityController.accessibleElementById("test5").childAtIndex(0));
+
+ debug("Test6 - alt on text content that uses the attr() function.");
+ outputElement(accessibilityController.accessibleElementById("test6").childAtIndex(0));
+
+ debug("alt accessed through Javascript: " + getComputedStyle(document.getElementById("test2"), ':after').alt);
+
+ debug("Test7 - alt does not apply to DOM nodes.");
+ outputElement(accessibilityController.accessibleElementById("image1"));
+
+ document.getElementById("content").style.visibility = "hidden";
+ }
+
+</script>
+
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</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 <cfleizach@apple.com>
+
+ AX: add "alt" as an overriding synonym of "-webkit-alt" (now in the CSS4 spec)
+ https://bugs.webkit.org/show_bug.cgi?id=138393
+
+ Reviewed by Dean Jackson.
+
+ Add official "alt" 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 <gyuyoung.kim@samsung.com>
</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->textOrientation());
</span><span class="cx"> case CSSPropertyWebkitLineBoxContain:
</span><span class="cx"> return createLineBoxContainValue(style->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: // [ <string> | attr(X) ]
</del><ins>+ case CSSPropertyAlt: // [ <string> | attr(X) ]
</ins><span class="cx"> return parseAlt(propId, important);
</span><span class="cx">
</span><span class="cx"> case CSSPropertyClip: // <shape> | 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()->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->isString()) {
</span></span></pre>
</div>
</div>
</body>
</html>