<!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>[176593] 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/176593">176593</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-12-01 10:42:52 -0800 (Mon, 01 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Transform StyleBuilderCustom into a class and mark it as a friend of RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=138999

Reviewed by Sam Weinig.

Transform StyleBuilderCustom into a class and mark it as a friend of
RenderStyle. This is needed because some of the StyleBuilderCustom
functions need to access RenderStyle's private API.

No new tests, no behavior change.

* css/StyleBuilderCustom.h:
  Move functions from StyleBuilderFunctions namespace to
  StyleBuilderCustom class.

* css/makeprop.pl:
  Use StyleBuilderCustom scope instead of StyleBuilderFunctions for
  custom implementation.

* rendering/style/RenderStyle.h:
  Mark StyleBuilderCustom class as a friend, similarly to what was
  already done for DeprecatedStyleBuilder and StyleResolver.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorecssmakeproppl">trunk/Source/WebCore/css/makeprop.pl</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176592 => 176593)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-01 17:50:35 UTC (rev 176592)
+++ trunk/Source/WebCore/ChangeLog        2014-12-01 18:42:52 UTC (rev 176593)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-12-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Transform StyleBuilderCustom into a class and mark it as a friend of RenderStyle
+        https://bugs.webkit.org/show_bug.cgi?id=138999
+
+        Reviewed by Sam Weinig.
+
+        Transform StyleBuilderCustom into a class and mark it as a friend of
+        RenderStyle. This is needed because some of the StyleBuilderCustom
+        functions need to access RenderStyle's private API.
+
+        No new tests, no behavior change.
+
+        * css/StyleBuilderCustom.h:
+          Move functions from StyleBuilderFunctions namespace to
+          StyleBuilderCustom class.
+
+        * css/makeprop.pl:
+          Use StyleBuilderCustom scope instead of StyleBuilderFunctions for
+          custom implementation.
+
+        * rendering/style/RenderStyle.h:
+          Mark StyleBuilderCustom class as a friend, similarly to what was
+          already done for DeprecatedStyleBuilder and StyleResolver.
+
</ins><span class="cx"> 2014-11-17  Oliver Hunt  &lt;oliver@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make sure range based iteration of Vector&lt;&gt; still receives bounds checking
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (176592 => 176593)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-12-01 17:50:35 UTC (rev 176592)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-12-01 18:42:52 UTC (rev 176593)
</span><span class="lines">@@ -39,9 +39,83 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> // Note that we assume the CSS parser only allows valid CSSValue types.
</span><del>-namespace StyleBuilderFunctions {
</del><ins>+class StyleBuilderCustom {
+public:
+    static void applyValueWebkitMarqueeIncrement(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx"> 
</span><del>-inline void applyValueWebkitMarqueeIncrement(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+    static void applyValueDirection(StyleResolver&amp;, CSSValue&amp;);
+
+    static void applyInitialZoom(StyleResolver&amp;);
+    static void applyInheritZoom(StyleResolver&amp;);
+    static void applyValueZoom(StyleResolver&amp;, CSSValue&amp;);
+
+#if ENABLE(CSS_SHAPES)
+    static void applyValueWebkitShapeOutside(StyleResolver&amp;, CSSValue&amp;);
+#endif // ENABLE(CSS_SHAPES)
+
+    static void applyValueVerticalAlign(StyleResolver&amp;, CSSValue&amp;);
+
+#if ENABLE(CSS_IMAGE_RESOLUTION)
+    static void applyInheritImageResolution(StyleResolver&amp;);
+    static void applyInitialImageResolution(StyleResolver&amp;);
+    static void applyValueImageResolution(StyleResolver&amp;, CSSValue&amp;);
+#endif // ENABLE(CSS_IMAGE_RESOLUTION)
+
+    static void applyInheritSize(StyleResolver&amp;);
+    static void applyInitialSize(StyleResolver&amp;);
+    static void applyValueSize(StyleResolver&amp;, CSSValue&amp;);
+
+    static void applyInheritTextIndent(StyleResolver&amp;);
+    static void applyInitialTextIndent(StyleResolver&amp;);
+    static void applyValueTextIndent(StyleResolver&amp;, CSSValue&amp;);
+
+#define DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(type, modifier) \
+    static void applyInherit##type##modifier(StyleResolver&amp;); \
+    static void applyInitial##type##modifier(StyleResolver&amp;); \
+    static void applyValue##type##modifier(StyleResolver&amp;, CSSValue&amp;)
+
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(BorderImage, Outset);
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(BorderImage, Repeat);
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(BorderImage, Slice);
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(BorderImage, Width);
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Outset);
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Repeat);
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Slice);
+    DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Width);
+
+    static void applyValueWordSpacing(StyleResolver&amp;, CSSValue&amp;);
+
+#if ENABLE(IOS_TEXT_AUTOSIZING)
+    static void applyInheritLineHeight(StyleResolver&amp;);
+    static void applyInitialLineHeight(StyleResolver&amp;);
+#endif // ENABLE(IOS_TEXT_AUTOSIZING)
+    static void applyValueLineHeight(StyleResolver&amp;, CSSValue&amp;);
+
+    static void applyInheritOutlineStyle(StyleResolver&amp;);
+    static void applyInitialOutlineStyle(StyleResolver&amp;);
+    static void applyValueOutlineStyle(StyleResolver&amp;, CSSValue&amp;);
+
+    static void applyInitialClip(StyleResolver&amp;);
+    static void applyInheritClip(StyleResolver&amp;);
+    static void applyValueClip(StyleResolver&amp;, CSSValue&amp;);
+
+    static void applyValueWebkitLocale(StyleResolver&amp;, CSSValue&amp;);
+    static void applyValueWebkitWritingMode(StyleResolver&amp;, CSSValue&amp;);
+    static void applyValueWebkitTextOrientation(StyleResolver&amp;, CSSValue&amp;);
+    static void applyValueWebkitJustifySelf(StyleResolver&amp;, CSSValue&amp;);
+    static void applyValueWebkitPerspective(StyleResolver&amp;, CSSValue&amp;);
+
+private:
+    static void resetEffectiveZoom(StyleResolver&amp;);
+    static CSSToLengthConversionData csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp;);
+    static bool convertLineHeight(StyleResolver&amp;, const CSSValue&amp;, Length&amp;, float multiplier = 1.f);
+
+    static Length mmLength(double mm);
+    static Length inchLength(double inch);
+    static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveValue* pageOrientation, Length&amp; width, Length&amp; height);
+};
+
+inline void StyleBuilderCustom::applyValueWebkitMarqueeIncrement(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx">     Length marqueeLength(Undefined);
</span><span class="lines">@@ -65,7 +139,7 @@
</span><span class="cx">         styleResolver.style()-&gt;setMarqueeIncrement(marqueeLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueDirection(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueDirection(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setDirection(downcast&lt;CSSPrimitiveValue&gt;(value));
</span><span class="cx"> 
</span><span class="lines">@@ -74,25 +148,25 @@
</span><span class="cx">         element-&gt;document().setDirectionSetOnDocumentElement(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void resetEffectiveZoom(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::resetEffectiveZoom(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     // Reset the zoom in effect. This allows the setZoom method to accurately compute a new zoom in effect.
</span><span class="cx">     styleResolver.setEffectiveZoom(styleResolver.parentStyle() ? styleResolver.parentStyle()-&gt;effectiveZoom() : RenderStyle::initialZoom());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInitialZoom(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInitialZoom(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     resetEffectiveZoom(styleResolver);
</span><span class="cx">     styleResolver.setZoom(RenderStyle::initialZoom());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInheritZoom(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInheritZoom(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     resetEffectiveZoom(styleResolver);
</span><span class="cx">     styleResolver.setZoom(styleResolver.parentStyle()-&gt;zoom());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueZoom(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueZoom(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx"> 
</span><span class="lines">@@ -118,7 +192,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><del>-inline void applyValueWebkitShapeOutside(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueWebkitShapeOutside(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     if (is&lt;CSSPrimitiveValue&gt;(value)) {
</span><span class="cx">         // FIXME: Shouldn't this be CSSValueNone?
</span><span class="lines">@@ -152,17 +226,17 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(CSS_SHAPES)
</span><span class="cx"> 
</span><del>-inline Length mmLength(double mm)
</del><ins>+inline Length StyleBuilderCustom::mmLength(double mm)
</ins><span class="cx"> {
</span><span class="cx">     Ref&lt;CSSPrimitiveValue&gt; value(CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM));
</span><span class="cx">     return value.get().computeLength&lt;Length&gt;(CSSToLengthConversionData());
</span><span class="cx"> }
</span><del>-inline Length inchLength(double inch)
</del><ins>+inline Length StyleBuilderCustom::inchLength(double inch)
</ins><span class="cx"> {
</span><span class="cx">     Ref&lt;CSSPrimitiveValue&gt; value(CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN));
</span><span class="cx">     return value.get().computeLength&lt;Length&gt;(CSSToLengthConversionData());
</span><span class="cx"> }
</span><del>-static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveValue* pageOrientation, Length&amp; width, Length&amp; height)
</del><ins>+bool StyleBuilderCustom::getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveValue* pageOrientation, Length&amp; width, Length&amp; height)
</ins><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;Length&gt; a5Width(mmLength(148));
</span><span class="cx">     static NeverDestroyed&lt;Length&gt; a5Height(mmLength(210));
</span><span class="lines">@@ -236,7 +310,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueVerticalAlign(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueVerticalAlign(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx">     if (primitiveValue.getValueID())
</span><span class="lines">@@ -246,21 +320,21 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION)
</span><del>-inline void applyInheritImageResolution(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInheritImageResolution(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setImageResolutionSource(styleResolver.parentStyle()-&gt;imageResolutionSource());
</span><span class="cx">     styleResolver.style()-&gt;setImageResolutionSnap(styleResolver.parentStyle()-&gt;imageResolutionSnap());
</span><span class="cx">     styleResolver.style()-&gt;setImageResolution(styleResolver.parentStyle()-&gt;imageResolution());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInitialImageResolution(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInitialImageResolution(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setImageResolutionSource(RenderStyle::initialImageResolutionSource());
</span><span class="cx">     styleResolver.style()-&gt;setImageResolutionSnap(RenderStyle::initialImageResolutionSnap());
</span><span class="cx">     styleResolver.style()-&gt;setImageResolution(RenderStyle::initialImageResolution());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueImageResolution(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueImageResolution(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     ImageResolutionSource source = RenderStyle::initialImageResolutionSource();
</span><span class="cx">     ImageResolutionSnap snap = RenderStyle::initialImageResolutionSnap();
</span><span class="lines">@@ -280,9 +354,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(CSS_IMAGE_RESOLUTION)
</span><span class="cx"> 
</span><del>-inline void applyInheritSize(StyleResolver&amp;) { }
-inline void applyInitialSize(StyleResolver&amp;) { }
-inline void applyValueSize(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyInheritSize(StyleResolver&amp;) { }
+inline void StyleBuilderCustom::applyInitialSize(StyleResolver&amp;) { }
+inline void StyleBuilderCustom::applyValueSize(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;resetPageSizeType();
</span><span class="cx">     Length width;
</span><span class="lines">@@ -356,7 +430,7 @@
</span><span class="cx">     styleResolver.style()-&gt;setPageSize(LengthSize(width, height));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInheritTextIndent(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInheritTextIndent(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setTextIndent(styleResolver.parentStyle()-&gt;textIndent());
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="lines">@@ -365,7 +439,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInitialTextIndent(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInitialTextIndent(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setTextIndent(RenderStyle::initialTextIndent());
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="lines">@@ -374,7 +448,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueTextIndent(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueTextIndent(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     Length lengthOrPercentageValue;
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="lines">@@ -471,27 +545,27 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    static inline const NinePieceImage&amp; getValue(RenderStyle* style)
</del><ins>+    static const NinePieceImage&amp; getValue(RenderStyle* style)
</ins><span class="cx">     {
</span><span class="cx">         return type == BorderImage ? style-&gt;borderImage() : style-&gt;maskBoxImage();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static inline void setValue(RenderStyle* style, const NinePieceImage&amp; value)
</del><ins>+    static void setValue(RenderStyle* style, const NinePieceImage&amp; value)
</ins><span class="cx">     {
</span><span class="cx">         return type == BorderImage ? style-&gt;setBorderImage(value) : style-&gt;setMaskBoxImage(value);
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #define DEFINE_BORDER_IMAGE_MODIFIER_HANDLER(type, modifier) \
</span><del>-inline void applyInherit##type##modifier(StyleResolver&amp; styleResolver) \
</del><ins>+inline void StyleBuilderCustom::applyInherit##type##modifier(StyleResolver&amp; styleResolver) \
</ins><span class="cx"> { \
</span><span class="cx">     ApplyPropertyBorderImageModifier&lt;type, modifier&gt;::applyInheritValue(styleResolver); \
</span><span class="cx"> } \
</span><del>-inline void applyInitial##type##modifier(StyleResolver&amp; styleResolver) \
</del><ins>+inline void StyleBuilderCustom::applyInitial##type##modifier(StyleResolver&amp; styleResolver) \
</ins><span class="cx"> { \
</span><span class="cx">     ApplyPropertyBorderImageModifier&lt;type, modifier&gt;::applyInitialValue(styleResolver); \
</span><span class="cx"> } \
</span><del>-inline void applyValue##type##modifier(StyleResolver&amp; styleResolver, CSSValue&amp; value) \
</del><ins>+inline void StyleBuilderCustom::applyValue##type##modifier(StyleResolver&amp; styleResolver, CSSValue&amp; value) \
</ins><span class="cx"> { \
</span><span class="cx">     ApplyPropertyBorderImageModifier&lt;type, modifier&gt;::applyValue(styleResolver, value); \
</span><span class="cx"> }
</span><span class="lines">@@ -505,7 +579,7 @@
</span><span class="cx"> DEFINE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Slice)
</span><span class="cx"> DEFINE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Width)
</span><span class="cx"> 
</span><del>-inline CSSToLengthConversionData csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp; styleResolver)
</del><ins>+inline CSSToLengthConversionData StyleBuilderCustom::csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     if (Frame* frame = styleResolver.document().frame())
</span><span class="cx">         return styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(styleResolver.style()-&gt;effectiveZoom() * frame-&gt;textZoomFactor());
</span><span class="lines">@@ -513,7 +587,7 @@
</span><span class="cx">     return styleResolver.state().cssToLengthConversionData();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline bool convertLineHeight(StyleResolver&amp; styleResolver, const CSSValue&amp; value, Length&amp; length, float multiplier = 1.f)
</del><ins>+inline bool StyleBuilderCustom::convertLineHeight(StyleResolver&amp; styleResolver, const CSSValue&amp; value, Length&amp; length, float multiplier)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx">     if (primitiveValue.getValueID() == CSSValueNormal) {
</span><span class="lines">@@ -539,7 +613,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueWordSpacing(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueWordSpacing(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx"> 
</span><span class="lines">@@ -559,19 +633,19 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> 
</span><del>-inline void applyInheritLineHeight(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInheritLineHeight(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setLineHeight(styleResolver.parentStyle()-&gt;lineHeight());
</span><span class="cx">     styleResolver.style()-&gt;setSpecifiedLineHeight(styleResolver.parentStyle()-&gt;specifiedLineHeight());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInitialLineHeight(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInitialLineHeight(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setLineHeight(RenderStyle::initialLineHeight());
</span><span class="cx">     styleResolver.style()-&gt;setSpecifiedLineHeight(RenderStyle::initialSpecifiedLineHeight());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueLineHeight(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueLineHeight(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     Length lineHeight;
</span><span class="cx">     float multiplier = styleResolver.style()-&gt;textSizeAdjust().isPercentage() ? styleResolver.style()-&gt;textSizeAdjust().multiplier() : 1.f;
</span><span class="lines">@@ -584,7 +658,7 @@
</span><span class="cx"> 
</span><span class="cx"> #else
</span><span class="cx"> 
</span><del>-inline void applyValueLineHeight(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueLineHeight(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     Length lineHeight;
</span><span class="cx">     if (!convertLineHeight(styleResolver, value, lineHeight))
</span><span class="lines">@@ -595,19 +669,19 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-inline void applyInheritOutlineStyle(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInheritOutlineStyle(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setOutlineStyleIsAuto(styleResolver.parentStyle()-&gt;outlineStyleIsAuto());
</span><span class="cx">     styleResolver.style()-&gt;setOutlineStyle(styleResolver.parentStyle()-&gt;outlineStyle());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInitialOutlineStyle(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInitialOutlineStyle(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setOutlineStyleIsAuto(RenderStyle::initialOutlineStyleIsAuto());
</span><span class="cx">     styleResolver.style()-&gt;setOutlineStyle(RenderStyle::initialBorderStyle());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueOutlineStyle(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueOutlineStyle(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx"> 
</span><span class="lines">@@ -615,13 +689,13 @@
</span><span class="cx">     styleResolver.style()-&gt;setOutlineStyle(primitiveValue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInitialClip(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInitialClip(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setClip(Length(), Length(), Length(), Length());
</span><span class="cx">     styleResolver.style()-&gt;setHasClip(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyInheritClip(StyleResolver&amp; styleResolver)
</del><ins>+inline void StyleBuilderCustom::applyInheritClip(StyleResolver&amp; styleResolver)
</ins><span class="cx"> {
</span><span class="cx">     RenderStyle* parentStyle = styleResolver.parentStyle();
</span><span class="cx">     if (!parentStyle-&gt;hasClip())
</span><span class="lines">@@ -630,7 +704,7 @@
</span><span class="cx">     styleResolver.style()-&gt;setHasClip(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueClip(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueClip(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx"> 
</span><span class="lines">@@ -648,7 +722,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueWebkitLocale(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueWebkitLocale(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx"> 
</span><span class="lines">@@ -662,7 +736,7 @@
</span><span class="cx">     styleResolver.setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueWebkitWritingMode(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueWebkitWritingMode(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.setWritingMode(downcast&lt;CSSPrimitiveValue&gt;(value));
</span><span class="cx"> 
</span><span class="lines">@@ -672,12 +746,12 @@
</span><span class="cx">         state.document().setWritingModeSetOnDocumentElement(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueWebkitTextOrientation(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueWebkitTextOrientation(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     styleResolver.setTextOrientation(downcast&lt;CSSPrimitiveValue&gt;(value));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueWebkitJustifySelf(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueWebkitJustifySelf(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx"> 
</span><span class="lines">@@ -688,7 +762,7 @@
</span><span class="cx">         styleResolver.style()-&gt;setJustifySelf(primitiveValue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void applyValueWebkitPerspective(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</del><ins>+inline void StyleBuilderCustom::applyValueWebkitPerspective(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="cx"> 
</span><span class="lines">@@ -713,8 +787,6 @@
</span><span class="cx">         styleResolver.style()-&gt;setPerspective(perspectiveValue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-} // namespace StyleBuilderFunctions
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // StyleBuilderCustom_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssmakeproppl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/makeprop.pl (176592 => 176593)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeprop.pl        2014-12-01 17:50:35 UTC (rev 176592)
+++ trunk/Source/WebCore/css/makeprop.pl        2014-12-01 18:42:52 UTC (rev 176593)
</span><span class="lines">@@ -417,13 +417,16 @@
</span><span class="cx">   # Skip properties still using the legacy style builder.
</span><span class="cx">   next unless exists($propertiesWithStyleBuilderOptions{$name});
</span><span class="cx"> 
</span><ins>+  my $scope = $propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;} eq &quot;All&quot; ? &quot;StyleBuilderCustom&quot; : &quot;StyleBuilderFunctions&quot;;
+  my $valueScope = $propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;} eq &quot;Value&quot; ? &quot;StyleBuilderCustom&quot; : $scope;
+
</ins><span class="cx">   print STYLEBUILDER &quot;    case CSSProperty&quot; . $nameToId{$name} . &quot;:\n&quot;;
</span><span class="cx">   print STYLEBUILDER &quot;        if (isInitial)\n&quot;;
</span><del>-  print STYLEBUILDER &quot;            StyleBuilderFunctions::applyInitial&quot; . $nameToId{$name} . &quot;(styleResolver);\n&quot;;
</del><ins>+  print STYLEBUILDER &quot;            &quot; . $scope . &quot;::applyInitial&quot; . $nameToId{$name} . &quot;(styleResolver);\n&quot;;
</ins><span class="cx">   print STYLEBUILDER &quot;        else if (isInherit)\n&quot;;
</span><del>-  print STYLEBUILDER &quot;            StyleBuilderFunctions::applyInherit&quot; . $nameToId{$name} . &quot;(styleResolver);\n&quot;;
</del><ins>+  print STYLEBUILDER &quot;            &quot; . $scope . &quot;::applyInherit&quot; . $nameToId{$name} . &quot;(styleResolver);\n&quot;;
</ins><span class="cx">   print STYLEBUILDER &quot;        else\n&quot;;
</span><del>-  print STYLEBUILDER &quot;            StyleBuilderFunctions::applyValue&quot; . $nameToId{$name} . &quot;(styleResolver, value);\n&quot;;
</del><ins>+  print STYLEBUILDER &quot;            &quot; . $valueScope . &quot;::applyValue&quot; . $nameToId{$name} . &quot;(styleResolver, value);\n&quot;;
</ins><span class="cx">   print STYLEBUILDER &quot;        return true;\n&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (176592 => 176593)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-12-01 17:50:35 UTC (rev 176592)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-12-01 18:42:52 UTC (rev 176593)
</span><span class="lines">@@ -128,6 +128,7 @@
</span><span class="cx">     friend class PropertyWrapperMaybeInvalidColor; // Used by CSS animations. We can't allow them to animate based off visited colors.
</span><span class="cx">     friend class RenderSVGResource; // FIXME: Needs to alter the visited state by hand. Should clean the SVG code up and move it into RenderStyle perhaps.
</span><span class="cx">     friend class RenderTreeAsText; // FIXME: Only needed so the render tree can keep lying and dump the wrong colors.  Rebaselining would allow this to be yanked.
</span><ins>+    friend class StyleBuilderCustom; // Sets members directly.
</ins><span class="cx">     friend class StyleResolver; // Sets members directly.
</span><span class="cx"> 
</span><span class="cx"> public:
</span></span></pre>
</div>
</div>

</body>
</html>