<!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>[171677] 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/171677">171677</a></dd>
<dt>Author</dt> <dd>zoltan@webkit.org</dd>
<dt>Date</dt> <dd>2014-07-28 08:05:14 -0700 (Mon, 28 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS3-Text] Adjust text-justify implementation to the latest spec
https://bugs.webkit.org/show_bug.cgi?id=135317

Reviewed by Darin Adler.

Source/WebCore:
Text-justify no longer accepts the following values: Inter-ideograph, inter-
cluster, and kashida. This patch removes them and updates the tests as well.

[1] http://dev.w3.org/csswg/css-text-3/#propdef-text-justify

Updated existing tests.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextJustify):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.h:

LayoutTests:
* fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js:
* fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcss3textcss3textjustifygetComputedStylescripttestsgetComputedStyletextjustifyinheritedjs">trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js</a></li>
<li><a href="#trunkLayoutTestsfastcss3textcss3textjustifygetComputedStylescripttestsgetComputedStyletextjustifyjs">trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/LayoutTests/ChangeLog        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-07-28  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
+
+        [CSS3-Text] Adjust text-justify implementation to the latest spec
+        https://bugs.webkit.org/show_bug.cgi?id=135317
+
+        Reviewed by Darin Adler.
+
+        * fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js:
+        * fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js:
+
</ins><span class="cx"> 2014-07-28  Radu Stavila  &lt;stavila@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r169105): Crash in selection
</span></span></pre></div>
<a id="trunkLayoutTestsfastcss3textcss3textjustifygetComputedStylescripttestsgetComputedStyletextjustifyinheritedjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -28,10 +28,7 @@
</span><span class="cx"> inheritanceTest(&quot;auto&quot;);
</span><span class="cx"> inheritanceTest(&quot;none&quot;);
</span><span class="cx"> inheritanceTest(&quot;inter-word&quot;);
</span><del>-inheritanceTest(&quot;inter-ideograph&quot;);
-inheritanceTest(&quot;inter-cluster&quot;);
</del><span class="cx"> inheritanceTest(&quot;distribute&quot;);
</span><del>-inheritanceTest(&quot;kashida&quot;);
</del><span class="cx"> 
</span><del>-ownValueTest(&quot;inter-word&quot;, &quot;inter-cluster&quot;);
-ownValueTest(&quot;inter-ideograph&quot;, &quot;distribute&quot;);
</del><ins>+ownValueTest(&quot;inter-word&quot;, &quot;distribute&quot;);
+ownValueTest(&quot;distribute&quot;, &quot;none&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcss3textcss3textjustifygetComputedStylescripttestsgetComputedStyletextjustifyjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -49,10 +49,7 @@
</span><span class="cx"> valueSettingTest('auto');
</span><span class="cx"> valueSettingTest('none');
</span><span class="cx"> valueSettingTest('inter-word');
</span><del>-valueSettingTest('inter-ideograph');
-valueSettingTest('inter-cluster');
</del><span class="cx"> valueSettingTest('distribute');
</span><del>-valueSettingTest('kashida');
</del><span class="cx"> 
</span><span class="cx"> defaultValue = 'auto'
</span><span class="cx"> e.style.webkitTextJustify = defaultValue;
</span><span class="lines">@@ -66,6 +63,9 @@
</span><span class="cx"> invalidValueSettingTest('bold', defaultValue);
</span><span class="cx"> invalidValueSettingTest('background', defaultValue);
</span><span class="cx"> invalidValueSettingTest('ltr', defaultValue);
</span><ins>+invalidValueSettingTest('inter-ideograph', defaultValue);
+invalidValueSettingTest('inter-cluster', defaultValue);
+invalidValueSettingTest('kashida', defaultValue);
</ins><span class="cx"> 
</span><span class="cx"> computedValueSettingTest('inherit', 'auto');
</span><span class="cx"> computedValueSettingTest('initial', 'auto');
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/Source/WebCore/ChangeLog        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-07-28  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
+
+        [CSS3-Text] Adjust text-justify implementation to the latest spec
+        https://bugs.webkit.org/show_bug.cgi?id=135317
+
+        Reviewed by Darin Adler.
+
+        Text-justify no longer accepts the following values: Inter-ideograph, inter-
+        cluster, and kashida. This patch removes them and updates the tests as well.
+
+        [1] http://dev.w3.org/csswg/css-text-3/#propdef-text-justify
+
+        Updated existing tests.
+
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator TextJustify):
+        * css/CSSValueKeywords.in:
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeRequiresLayout):
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareInheritedData.h:
+
</ins><span class="cx"> 2014-07-28  Radu Stavila  &lt;stavila@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r169105): Crash in selection
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -973,8 +973,8 @@
</span><span class="cx">         break;
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     case CSSPropertyWebkitTextJustify:
</span><del>-        // auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida
-        if ((valueID &gt;= CSSValueInterWord &amp;&amp; valueID &lt;= CSSValueKashida) || valueID == CSSValueAuto || valueID == CSSValueNone)
</del><ins>+        // auto | none | inter-word | distribute
+        if (valueID == CSSValueInterWord || valueID == CSSValueDistribute || valueID == CSSValueAuto || valueID == CSSValueNone)
</ins><span class="cx">             return true;
</span><span class="cx">         break;
</span><span class="cx"> #endif // CSS3_TEXT
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -2562,18 +2562,9 @@
</span><span class="cx">     case TextJustifyInterWord:
</span><span class="cx">         m_value.valueID = CSSValueInterWord;
</span><span class="cx">         break;
</span><del>-    case TextJustifyInterIdeograph:
-        m_value.valueID = CSSValueInterIdeograph;
-        break;
-    case TextJustifyInterCluster:
-        m_value.valueID = CSSValueInterCluster;
-        break;
</del><span class="cx">     case TextJustifyDistribute:
</span><span class="cx">         m_value.valueID = CSSValueDistribute;
</span><span class="cx">         break;
</span><del>-    case TextJustifyKashida:
-        m_value.valueID = CSSValueKashida;
-        break;
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2588,14 +2579,8 @@
</span><span class="cx">         return TextJustifyNone;
</span><span class="cx">     case CSSValueInterWord:
</span><span class="cx">         return TextJustifyInterWord;
</span><del>-    case CSSValueInterIdeograph:
-        return TextJustifyInterIdeograph;
-    case CSSValueInterCluster:
-        return TextJustifyInterCluster;
</del><span class="cx">     case CSSValueDistribute:
</span><span class="cx">         return TextJustifyDistribute;
</span><del>-    case CSSValueKashida:
-        return TextJustifyKashida;
</del><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -244,10 +244,7 @@
</span><span class="cx"> //auto
</span><span class="cx"> //none
</span><span class="cx"> inter-word
</span><del>-inter-ideograph
-inter-cluster
</del><span class="cx"> distribute
</span><del>-kashida
</del><span class="cx"> //
</span><span class="cx"> // CSS_PROP_LIST_STYLE_POSITION:
</span><span class="cx"> //
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -489,6 +489,7 @@
</span><span class="cx">         if (rareInheritedData-&gt;indent != other-&gt;rareInheritedData-&gt;indent
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">             || rareInheritedData-&gt;m_textAlignLast != other-&gt;rareInheritedData-&gt;m_textAlignLast
</span><ins>+            || rareInheritedData-&gt;m_textJustify != other-&gt;rareInheritedData-&gt;m_textJustify
</ins><span class="cx">             || rareInheritedData-&gt;m_textIndentLine != other-&gt;rareInheritedData-&gt;m_textIndentLine
</span><span class="cx"> #endif
</span><span class="cx">             || rareInheritedData-&gt;m_effectiveZoom != other-&gt;rareInheritedData-&gt;m_effectiveZoom
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -384,7 +384,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> enum TextJustify {
</span><del>-    TextJustifyAuto, TextJustifyNone, TextJustifyInterWord, TextJustifyInterIdeograph, TextJustifyInterCluster, TextJustifyDistribute, TextJustifyKashida
</del><ins>+    TextJustifyAuto, TextJustifyNone, TextJustifyInterWord, TextJustifyDistribute
</ins><span class="cx"> };
</span><span class="cx"> #endif // CSS3_TEXT
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (171676 => 171677)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2014-07-28 13:19:22 UTC (rev 171676)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2014-07-28 15:05:14 UTC (rev 171677)
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     unsigned m_textAlignLast : 3; // TextAlignLast
</span><del>-    unsigned m_textJustify : 3; // TextJustify
</del><ins>+    unsigned m_textJustify : 2; // TextJustify
</ins><span class="cx"> #endif // CSS3_TEXT
</span><span class="cx">     unsigned m_textDecorationSkip : 5; // TextDecorationSkip
</span><span class="cx">     unsigned m_textUnderlinePosition : 3; // TextUnderlinePosition
</span></span></pre>
</div>
</div>

</body>
</html>