<!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>[176571] trunk/Source/WebCore</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/176571">176571</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-11-28 22:20:25 -0800 (Fri, 28 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move the '-webkit-initial-letter', '-webkit-line-box-contain' and '-webkit-text-stroke-width' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139053

Patch by Sam Weinig &lt;sam@webkit.org&gt; on 2014-11-28
Reviewed by Andreas Kling.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertInitialLetter):
(WebCore::StyleBuilderConverter::convertTextStrokeWidth):
(WebCore::StyleBuilderConverter::convertLineBoxContain):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176570 => 176571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-28 22:10:24 UTC (rev 176570)
+++ trunk/Source/WebCore/ChangeLog        2014-11-29 06:20:25 UTC (rev 176571)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-11-28  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Move the '-webkit-initial-letter', '-webkit-line-box-contain' and '-webkit-text-stroke-width' CSS properties to the new StyleBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=139053
+
+        Reviewed by Andreas Kling.
+
+        * css/CSSPropertyNames.in:
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertInitialLetter):
+        (WebCore::StyleBuilderConverter::convertTextStrokeWidth):
+        (WebCore::StyleBuilderConverter::convertLineBoxContain):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::applyProperty):
+
</ins><span class="cx"> 2014-11-26  Philippe Normand  &lt;pnormand@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GStreamer] HTTP source element lacks SCHEDULING query support
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (176570 => 176571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2014-11-28 22:10:24 UTC (rev 176570)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2014-11-29 06:20:25 UTC (rev 176571)
</span><span class="lines">@@ -412,8 +412,8 @@
</span><span class="cx"> -webkit-hyphenate-limit-lines [Inherited, NameForMethods=HyphenationLimitLines, Converter=WebkitHyphenateLimitLines]
</span><span class="cx"> -webkit-hyphens [Inherited, TypeName=Hyphens]
</span><span class="cx"> -epub-hyphens = -webkit-hyphens
</span><del>--webkit-initial-letter [LegacyStyleBuilder]
--webkit-line-box-contain [Inherited, LegacyStyleBuilder]
</del><ins>+-webkit-initial-letter [Converter=InitialLetter]
+-webkit-line-box-contain [Inherited, Converter=LineBoxContain]
</ins><span class="cx"> -webkit-line-align [Inherited, TypeName=LineAlign]
</span><span class="cx"> -webkit-line-break [Inherited, TypeName=LineBreak]
</span><span class="cx"> -webkit-line-clamp [TypeName=LineClampValue]
</span><span class="lines">@@ -507,7 +507,7 @@
</span><span class="cx"> -webkit-text-security [Inherited]
</span><span class="cx"> -webkit-text-stroke [Inherited, LegacyStyleBuilder]
</span><span class="cx"> -webkit-text-stroke-color [Inherited, LegacyStyleBuilder]
</span><del>--webkit-text-stroke-width [Inherited, LegacyStyleBuilder]
</del><ins>+-webkit-text-stroke-width [Inherited, Converter=TextStrokeWidth]
</ins><span class="cx"> -webkit-transform [Converter=Transform]
</span><span class="cx"> -webkit-transform-origin [LegacyStyleBuilder]
</span><span class="cx"> -webkit-transform-origin-x [Converter=Length]
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (176570 => 176571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2014-11-28 22:10:24 UTC (rev 176570)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2014-11-29 06:20:25 UTC (rev 176571)
</span><span class="lines">@@ -70,6 +70,9 @@
</span><span class="cx">     static PassRefPtr&lt;QuotesData&gt; convertQuotes(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static TextUnderlinePosition convertTextUnderlinePosition(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static PassRefPtr&lt;StyleReflection&gt; convertReflection(StyleResolver&amp;, CSSValue&amp;);
</span><ins>+    static IntSize convertInitialLetter(StyleResolver&amp;, CSSValue&amp;);
+    static float convertTextStrokeWidth(StyleResolver&amp;, CSSValue&amp;);
+    static LineBoxContain convertLineBoxContain(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static Length convertToRadiusLength(CSSToLengthConversionData&amp;, CSSPrimitiveValue&amp;);
</span><span class="lines">@@ -494,6 +497,62 @@
</span><span class="cx">     return reflection.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline IntSize StyleBuilderConverter::convertInitialLetter(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+
+    if (primitiveValue.getValueID() == CSSValueNormal)
+        return IntSize();
+
+    Pair* pair = primitiveValue.getPairValue();
+    ASSERT(pair);
+    ASSERT(pair-&gt;first());
+    ASSERT(pair-&gt;second());
+
+    return IntSize(pair-&gt;first()-&gt;getIntValue(), pair-&gt;second()-&gt;getIntValue());
+}
+
+inline float StyleBuilderConverter::convertTextStrokeWidth(StyleResolver&amp; styleResolver, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+
+    float width = 0;
+    switch (primitiveValue.getValueID()) {
+    case CSSValueThin:
+    case CSSValueMedium:
+    case CSSValueThick: {
+        double result = 1.0 / 48;
+        if (primitiveValue.getValueID() == CSSValueMedium)
+            result *= 3;
+        else if (primitiveValue.getValueID() == CSSValueThick)
+            result *= 5;
+        Ref&lt;CSSPrimitiveValue&gt; emsValue(CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS));
+        width = convertComputedLength&lt;float&gt;(styleResolver, emsValue);
+        break;
+    }
+    case CSSValueInvalid: {
+        width = convertComputedLength&lt;float&gt;(styleResolver, primitiveValue);
+        break;
+    }
+    default:
+        ASSERT_NOT_REACHED();
+        return 0;
+    }
+
+    return width;
+}
+
+inline LineBoxContain StyleBuilderConverter::convertLineBoxContain(StyleResolver&amp;, CSSValue&amp; value)
+{
+    if (is&lt;CSSPrimitiveValue&gt;(value)) {
+        ASSERT(downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueNone);
+        return LineBoxContainNone;
+    }
+
+    return downcast&lt;CSSLineBoxContainValue&gt;(value).value();
+}
+
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // StyleBuilderConverter_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (176570 => 176571)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-11-28 22:10:24 UTC (rev 176570)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-11-29 06:20:25 UTC (rev 176571)
</span><span class="lines">@@ -2489,29 +2489,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><del>-    case CSSPropertyWebkitTextStrokeWidth: {
-        HANDLE_INHERIT_AND_INITIAL(textStrokeWidth, TextStrokeWidth)
-        float width = 0;
-        switch (primitiveValue-&gt;getValueID()) {
-        case CSSValueThin:
-        case CSSValueMedium:
-        case CSSValueThick: {
-            double result = 1.0 / 48;
-            if (primitiveValue-&gt;getValueID() == CSSValueMedium)
-                result *= 3;
-            else if (primitiveValue-&gt;getValueID() == CSSValueThick)
-                result *= 5;
-            Ref&lt;CSSPrimitiveValue&gt; value(CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS));
-            width = value.get().computeLength&lt;float&gt;(state.cssToLengthConversionData());
-            break;
-        }
-        default:
-            width = primitiveValue-&gt;computeLength&lt;float&gt;(state.cssToLengthConversionData());
-            break;
-        }
-        state.style()-&gt;setTextStrokeWidth(width);
-        return;
-    }
</del><span class="cx">     case CSSPropertyWebkitPerspective: {
</span><span class="cx">         HANDLE_INHERIT_AND_INITIAL(perspective, Perspective)
</span><span class="cx"> 
</span><span class="lines">@@ -2612,20 +2589,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    case CSSPropertyWebkitLineBoxContain: {
-        HANDLE_INHERIT_AND_INITIAL(lineBoxContain, LineBoxContain)
-        if (primitiveValue &amp;&amp; primitiveValue-&gt;getValueID() == CSSValueNone) {
-            state.style()-&gt;setLineBoxContain(LineBoxContainNone);
-            return;
-        }
-
-        if (!is&lt;CSSLineBoxContainValue&gt;(*value))
-            return;
-
-        state.style()-&gt;setLineBoxContain(downcast&lt;CSSLineBoxContainValue&gt;(*value).value());
-        return;
-    }
-
</del><span class="cx">     // CSS Fonts Module Level 3
</span><span class="cx">     case CSSPropertyWebkitFontFeatureSettings: {
</span><span class="cx">         if (primitiveValue &amp;&amp; primitiveValue-&gt;getValueID() == CSSValueNormal) {
</span><span class="lines">@@ -2887,24 +2850,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><del>-
-    case CSSPropertyWebkitInitialLetter: {
-        HANDLE_INHERIT_AND_INITIAL(initialLetter, InitialLetter)
-        if (!value-&gt;isPrimitiveValue())
-            return;
-        
-        if (primitiveValue-&gt;getValueID() == CSSValueNormal) {
-            state.style()-&gt;setInitialLetter(IntSize());
-            return;
-        }
-            
-        Pair* pair = primitiveValue-&gt;getPairValue();
-        if (!pair || !pair-&gt;first() || !pair-&gt;second())
-            return;
-
-        state.style()-&gt;setInitialLetter(IntSize(pair-&gt;first()-&gt;getIntValue(), pair-&gt;second()-&gt;getIntValue()));
-        return;
-    }
</del><span class="cx">     
</span><span class="cx">     // These properties are aliased and DeprecatedStyleBuilder already applied the property on the prefixed version.
</span><span class="cx">     case CSSPropertyAnimationDelay:
</span><span class="lines">@@ -3097,7 +3042,9 @@
</span><span class="cx">     case CSSPropertyWebkitHyphenateLimitBefore:
</span><span class="cx">     case CSSPropertyWebkitHyphenateLimitLines:
</span><span class="cx">     case CSSPropertyWebkitHyphens:
</span><ins>+    case CSSPropertyWebkitInitialLetter:
</ins><span class="cx">     case CSSPropertyWebkitLineAlign:
</span><ins>+    case CSSPropertyWebkitLineBoxContain:
</ins><span class="cx">     case CSSPropertyWebkitLineBreak:
</span><span class="cx">     case CSSPropertyWebkitLineClamp:
</span><span class="cx">     case CSSPropertyWebkitLineGrid:
</span><span class="lines">@@ -3152,6 +3099,7 @@
</span><span class="cx">     case CSSPropertyWebkitTextFillColor:
</span><span class="cx">     case CSSPropertyWebkitTextSecurity:
</span><span class="cx">     case CSSPropertyWebkitTextStrokeColor:
</span><ins>+    case CSSPropertyWebkitTextStrokeWidth:
</ins><span class="cx">     case CSSPropertyWebkitTransformOriginX:
</span><span class="cx">     case CSSPropertyWebkitTransformOriginY:
</span><span class="cx">     case CSSPropertyWebkitTransformOriginZ:
</span></span></pre>
</div>
</div>

</body>
</html>