<!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>[177572] 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/177572">177572</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-12-19 00:57:30 -0800 (Fri, 19 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up StyleBuilderCustom and DeprecatedStyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139807

Reviewed by Antti Koivisto.

Clean up StyleBuilderCustom and DeprecatedStyleBuilder.

* css/DeprecatedStyleBuilder.cpp:

- Remove unnecessary header includes.

(WebCore::ApplyPropertyPerspectiveOrigin::applyInheritValue):
(WebCore::ApplyPropertyPerspectiveOrigin::applyInitialValue):
(WebCore::ApplyPropertyPerspectiveOrigin::applyValue):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyExpanding::applyInheritValue): Deleted.
(WebCore::ApplyPropertyExpanding::applyInitialValue): Deleted.
(WebCore::ApplyPropertyExpanding::applyValue): Deleted.
(WebCore::ApplyPropertyExpanding::createHandler): Deleted.

- Rename ApplyPropertyExpanding to ApplyPropertyPerspectiveOrigin as
  PerspectiveOrigin is the only remaining user of this class. This also
  allows us to simplify the implementation a lot.

(WebCore::ApplyPropertyDefaultBase::setValue): Deleted.
(WebCore::ApplyPropertyDefaultBase::value): Deleted.
(WebCore::ApplyPropertyDefaultBase::initial): Deleted.
(WebCore::ApplyPropertyDefaultBase::applyInheritValue): Deleted.
(WebCore::ApplyPropertyDefaultBase::applyInitialValue): Deleted.
(WebCore::ApplyPropertyDefaultBase::applyValue): Deleted.

- There is no longer any user of this templated class.

* css/StyleBuilderCustom.h:

- Introduce a macro that declares all 3 handlers (inherit, initial and
  value) in the StyleBuilderCustom class. This greatly reduces the
  number of lines in this class.
- Also alphabetize the handlers.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177571 => 177572)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-19 08:37:10 UTC (rev 177571)
+++ trunk/Source/WebCore/ChangeLog        2014-12-19 08:57:30 UTC (rev 177572)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2014-12-19  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Clean up StyleBuilderCustom and DeprecatedStyleBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=139807
+
+        Reviewed by Antti Koivisto.
+
+        Clean up StyleBuilderCustom and DeprecatedStyleBuilder.
+
+        * css/DeprecatedStyleBuilder.cpp:
+
+        - Remove unnecessary header includes.
+
+        (WebCore::ApplyPropertyPerspectiveOrigin::applyInheritValue):
+        (WebCore::ApplyPropertyPerspectiveOrigin::applyInitialValue):
+        (WebCore::ApplyPropertyPerspectiveOrigin::applyValue):
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        (WebCore::ApplyPropertyExpanding::applyInheritValue): Deleted.
+        (WebCore::ApplyPropertyExpanding::applyInitialValue): Deleted.
+        (WebCore::ApplyPropertyExpanding::applyValue): Deleted.
+        (WebCore::ApplyPropertyExpanding::createHandler): Deleted.
+
+        - Rename ApplyPropertyExpanding to ApplyPropertyPerspectiveOrigin as
+          PerspectiveOrigin is the only remaining user of this class. This also
+          allows us to simplify the implementation a lot.
+
+        (WebCore::ApplyPropertyDefaultBase::setValue): Deleted.
+        (WebCore::ApplyPropertyDefaultBase::value): Deleted.
+        (WebCore::ApplyPropertyDefaultBase::initial): Deleted.
+        (WebCore::ApplyPropertyDefaultBase::applyInheritValue): Deleted.
+        (WebCore::ApplyPropertyDefaultBase::applyInitialValue): Deleted.
+        (WebCore::ApplyPropertyDefaultBase::applyValue): Deleted.
+
+        - There is no longer any user of this templated class.
+
+        * css/StyleBuilderCustom.h:
+
+        - Introduce a macro that declares all 3 handlers (inherit, initial and
+          value) in the StyleBuilderCustom class. This greatly reduces the
+          number of lines in this class.
+        - Also alphabetize the handlers.
+
</ins><span class="cx"> 2014-12-18  Jeremy Jones  &lt;jeremyj@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         dispatch to main thread before accessing playerController() in WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (177571 => 177572)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-19 08:37:10 UTC (rev 177571)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-19 08:57:30 UTC (rev 177572)
</span><span class="lines">@@ -27,50 +27,27 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;DeprecatedStyleBuilder.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;BasicShapeFunctions.h&quot;
-#include &quot;BasicShapes.h&quot;
-#include &quot;CSSAspectRatioValue.h&quot;
-#include &quot;CSSCalculationValue.h&quot;
-#include &quot;CSSCursorImageValue.h&quot;
-#include &quot;CSSImageGeneratorValue.h&quot;
</del><span class="cx"> #include &quot;CSSImageSetValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><span class="cx"> #include &quot;CSSToStyleMap.h&quot;
</span><span class="cx"> #include &quot;CSSValueList.h&quot;
</span><del>-#include &quot;ClipPathOperation.h&quot;
-#include &quot;CursorList.h&quot;
-#include &quot;Document.h&quot;
-#include &quot;Frame.h&quot;
</del><span class="cx"> #include &quot;HTMLElement.h&quot;
</span><del>-#include &quot;Pair.h&quot;
-#include &quot;Rect.h&quot;
</del><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><del>-#include &quot;RenderView.h&quot;
-#include &quot;Settings.h&quot;
</del><span class="cx"> #include &quot;StyleFontSizeFunctions.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><del>-#include &lt;wtf/StdLibExtras.h&gt;
</del><span class="cx"> 
</span><del>-#if ENABLE(CSS_SHAPES)
-#include &quot;ShapeValue.h&quot;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="cx"> 
</span><del>-enum ExpandValueBehavior {SuppressValue = 0, ExpandValue};
-template &lt;ExpandValueBehavior expandValue, CSSPropertyID one = CSSPropertyInvalid, CSSPropertyID two = CSSPropertyInvalid, CSSPropertyID three = CSSPropertyInvalid, CSSPropertyID four = CSSPropertyInvalid, CSSPropertyID five = CSSPropertyInvalid&gt;
-class ApplyPropertyExpanding {
</del><ins>+class ApplyPropertyPerspectiveOrigin {
</ins><span class="cx"> public:
</span><del>-
</del><span class="cx">     template &lt;CSSPropertyID id&gt;
</span><span class="cx">     static inline void applyInheritValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
</span><span class="cx">     {
</span><del>-        if (id == CSSPropertyInvalid)
-            return;
-
</del><ins>+        // FIXME: This doesn't seem to do anything as CSSPropertyWebkitPerspectiveOriginX
+        // and CSSPropertyWebkitPerspectiveOriginY don't have a property handler.
</ins><span class="cx">         const DeprecatedStyleBuilder&amp; table = DeprecatedStyleBuilder::sharedStyleBuilder();
</span><span class="cx">         const PropertyHandler&amp; handler = table.propertyHandler(id);
</span><span class="cx">         if (handler.isValid())
</span><span class="lines">@@ -79,19 +56,15 @@
</span><span class="cx"> 
</span><span class="cx">     static void applyInheritValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
</span><span class="cx">     {
</span><del>-        applyInheritValue&lt;one&gt;(propertyID, styleResolver);
-        applyInheritValue&lt;two&gt;(propertyID, styleResolver);
-        applyInheritValue&lt;three&gt;(propertyID, styleResolver);
-        applyInheritValue&lt;four&gt;(propertyID, styleResolver);
-        applyInheritValue&lt;five&gt;(propertyID, styleResolver);
</del><ins>+        applyInheritValue&lt;CSSPropertyWebkitPerspectiveOriginX&gt;(propertyID, styleResolver);
+        applyInheritValue&lt;CSSPropertyWebkitPerspectiveOriginY&gt;(propertyID, styleResolver);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     template &lt;CSSPropertyID id&gt;
</span><span class="cx">     static inline void applyInitialValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
</span><span class="cx">     {
</span><del>-        if (id == CSSPropertyInvalid)
-            return;
-
</del><ins>+        // FIXME: This doesn't seem to do anything as CSSPropertyWebkitPerspectiveOriginX
+        // and CSSPropertyWebkitPerspectiveOriginY don't have a property handler.
</ins><span class="cx">         const DeprecatedStyleBuilder&amp; table = DeprecatedStyleBuilder::sharedStyleBuilder();
</span><span class="cx">         const PropertyHandler&amp; handler = table.propertyHandler(id);
</span><span class="cx">         if (handler.isValid())
</span><span class="lines">@@ -100,51 +73,16 @@
</span><span class="cx"> 
</span><span class="cx">     static void applyInitialValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
</span><span class="cx">     {
</span><del>-        applyInitialValue&lt;one&gt;(propertyID, styleResolver);
-        applyInitialValue&lt;two&gt;(propertyID, styleResolver);
-        applyInitialValue&lt;three&gt;(propertyID, styleResolver);
-        applyInitialValue&lt;four&gt;(propertyID, styleResolver);
-        applyInitialValue&lt;five&gt;(propertyID, styleResolver);
</del><ins>+        applyInitialValue&lt;CSSPropertyWebkitPerspectiveOriginX&gt;(propertyID, styleResolver);
+        applyInitialValue&lt;CSSPropertyWebkitPerspectiveOriginY&gt;(propertyID, styleResolver);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    template &lt;CSSPropertyID id&gt;
-    static inline void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
-    {
-        if (id == CSSPropertyInvalid)
-            return;
</del><ins>+    static void applyValue(CSSPropertyID, StyleResolver*, CSSValue*)
+    { }
</ins><span class="cx"> 
</span><del>-        const DeprecatedStyleBuilder&amp; table = DeprecatedStyleBuilder::sharedStyleBuilder();
-        const PropertyHandler&amp; handler = table.propertyHandler(id);
-        if (handler.isValid())
-            handler.applyValue(propertyID, styleResolver, value);
-    }
-
-    static void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
-    {
-        if (!expandValue)
-            return;
-
-        applyValue&lt;one&gt;(propertyID, styleResolver, value);
-        applyValue&lt;two&gt;(propertyID, styleResolver, value);
-        applyValue&lt;three&gt;(propertyID, styleResolver, value);
-        applyValue&lt;four&gt;(propertyID, styleResolver, value);
-        applyValue&lt;five&gt;(propertyID, styleResolver, value);
-    }
</del><span class="cx">     static PropertyHandler createHandler() { return PropertyHandler(&amp;applyInheritValue, &amp;applyInitialValue, &amp;applyValue); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template &lt;typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()&gt;
-class ApplyPropertyDefaultBase {
-public:
-    static void setValue(RenderStyle* style, SetterType value) { (style-&gt;*setterFunction)(value); }
-    static GetterType value(RenderStyle* style) { return (style-&gt;*getterFunction)(); }
-    static InitialType initial() { return (*initialFunction)(); }
-    static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver) { setValue(styleResolver-&gt;style(), value(styleResolver-&gt;parentStyle())); }
-    static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver) { setValue(styleResolver-&gt;style(), initial()); }
-    static void applyValue(CSSPropertyID, StyleResolver*, CSSValue*) { }
-    static PropertyHandler createHandler() { return PropertyHandler(&amp;applyInheritValue, &amp;applyInitialValue, &amp;applyValue); }
-};
-
</del><span class="cx"> enum AutoValueType {Number = 0, ComputeLength};
</span><span class="cx"> template &lt;typename T, T (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(T), bool (RenderStyle::*hasAutoFunction)() const, void (RenderStyle::*setAutoFunction)(), AutoValueType valueType = Number, int autoIdentity = CSSValueAuto&gt;
</span><span class="cx"> class ApplyPropertyAuto {
</span><span class="lines">@@ -732,7 +670,7 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskRepeatY, ApplyPropertyFillLayer&lt;EFillRepeat, CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isRepeatYSet, &amp;FillLayer::repeatY, &amp;FillLayer::setRepeatY, &amp;FillLayer::clearRepeatY, &amp;FillLayer::initialFillRepeatY, &amp;CSSToStyleMap::mapFillRepeatY&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer&lt;FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isSizeSet, &amp;FillLayer::size, &amp;FillLayer::setSize, &amp;FillLayer::clearSize, &amp;FillLayer::initialFillSize, &amp;CSSToStyleMap::mapFillSize&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskSourceType, ApplyPropertyFillLayer&lt;EMaskSourceType, CSSPropertyWebkitMaskSourceType, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isMaskSourceTypeSet, &amp;FillLayer::maskSourceType, &amp;FillLayer::setMaskSourceType, &amp;FillLayer::clearMaskSourceType, &amp;FillLayer::initialMaskSourceType, &amp;CSSToStyleMap::mapFillMaskSourceType&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding&lt;SuppressValue, CSSPropertyWebkitPerspectiveOriginX, CSSPropertyWebkitPerspectiveOriginY&gt;::createHandler());
</del><ins>+    setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyPerspectiveOrigin::createHandler());
</ins><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textEmphasisColor, &amp;RenderStyle::setTextEmphasisColor, &amp;RenderStyle::setVisitedLinkTextEmphasisColor, &amp;RenderStyle::color&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextFillColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textFillColor, &amp;RenderStyle::setTextFillColor, &amp;RenderStyle::setVisitedLinkTextFillColor, &amp;RenderStyle::color&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextStrokeColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textStrokeColor, &amp;RenderStyle::setTextStrokeColor, &amp;RenderStyle::setVisitedLinkTextStrokeColor, &amp;RenderStyle::color&gt;::createHandler());
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (177571 => 177572)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-12-19 08:37:10 UTC (rev 177571)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-12-19 08:57:30 UTC (rev 177572)
</span><span class="lines">@@ -40,109 +40,63 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+#define DECLARE_PROPERTY_CUSTOM_HANDLERS(property) \
+    static void applyInherit##property(StyleResolver&amp;); \
+    static void applyInitial##property(StyleResolver&amp;); \
+    static void applyValue##property(StyleResolver&amp;, CSSValue&amp;)
+
</ins><span class="cx"> // Note that we assume the CSS parser only allows valid CSSValue types.
</span><span class="cx"> class StyleBuilderCustom {
</span><span class="cx"> public:
</span><del>-    static void applyValueWebkitMarqueeIncrement(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyValueDirection(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInitialZoom(StyleResolver&amp;);
-    static void applyInheritZoom(StyleResolver&amp;);
-    static void applyValueZoom(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyValueVerticalAlign(StyleResolver&amp;, CSSValue&amp;);
-
</del><ins>+    // Custom handling of inherit, initial and value setting.
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(BorderImageOutset);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(BorderImageRepeat);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(BorderImageSlice);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(BorderImageWidth);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(BoxShadow);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(Clip);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(CounterIncrement);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(CounterReset);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(Cursor);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(FontFamily);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(FontWeight);
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION)
</span><del>-    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;);
-
</del><ins>+    DECLARE_PROPERTY_CUSTOM_HANDLERS(ImageResolution);
+#endif
</ins><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><del>-    static void applyInheritLineHeight(StyleResolver&amp;);
-    static void applyInitialLineHeight(StyleResolver&amp;);
-#endif // ENABLE(IOS_TEXT_AUTOSIZING)
-    static void applyValueLineHeight(StyleResolver&amp;, CSSValue&amp;);
</del><ins>+    DECLARE_PROPERTY_CUSTOM_HANDLERS(LineHeight);
+#endif
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(OutlineStyle);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(Size);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(TextIndent);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(TextShadow);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitAspectRatio);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitBoxShadow);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitMaskBoxImageOutset);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitMaskBoxImageRepeat);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitMaskBoxImageSlice);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitMaskBoxImageWidth);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(WebkitTextEmphasisStyle);
+    DECLARE_PROPERTY_CUSTOM_HANDLERS(Zoom);
</ins><span class="cx"> 
</span><del>-    static void applyInheritOutlineStyle(StyleResolver&amp;);
-    static void applyInitialOutlineStyle(StyleResolver&amp;);
-    static void applyValueOutlineStyle(StyleResolver&amp;, CSSValue&amp;);
</del><ins>+    // Custom handling of inherit + value setting only.
+    static void applyInheritDisplay(StyleResolver&amp;);
+    static void applyValueDisplay(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx"> 
</span><del>-    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;);
</del><ins>+    // Custom handling of value setting only.
+    static void applyValueDirection(StyleResolver&amp;, CSSValue&amp;);
+#if !ENABLE(IOS_TEXT_AUTOSIZING)
+    static void applyValueLineHeight(StyleResolver&amp;, CSSValue&amp;);
+#endif
+    static void applyValueVerticalAlign(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx">     static void applyValueWebkitJustifySelf(StyleResolver&amp;, CSSValue&amp;);
</span><ins>+    static void applyValueWebkitLocale(StyleResolver&amp;, CSSValue&amp;);
+    static void applyValueWebkitMarqueeIncrement(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx">     static void applyValueWebkitPerspective(StyleResolver&amp;, CSSValue&amp;);
</span><ins>+    static void applyValueWebkitTextOrientation(StyleResolver&amp;, CSSValue&amp;);
+    static void applyValueWebkitWritingMode(StyleResolver&amp;, CSSValue&amp;);
+    static void applyValueWordSpacing(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx"> 
</span><del>-    static void applyInitialTextShadow(StyleResolver&amp;);
-    static void applyInheritTextShadow(StyleResolver&amp;);
-    static void applyValueTextShadow(StyleResolver&amp;, CSSValue&amp;);
-    static void applyInitialBoxShadow(StyleResolver&amp;);
-    static void applyInheritBoxShadow(StyleResolver&amp;);
-    static void applyValueBoxShadow(StyleResolver&amp;, CSSValue&amp;);
-    static void applyInitialWebkitBoxShadow(StyleResolver&amp;);
-    static void applyInheritWebkitBoxShadow(StyleResolver&amp;);
-    static void applyValueWebkitBoxShadow(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInitialFontFamily(StyleResolver&amp;);
-    static void applyInheritFontFamily(StyleResolver&amp;);
-    static void applyValueFontFamily(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInheritDisplay(StyleResolver&amp;);
-    static void applyValueDisplay(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInitialWebkitAspectRatio(StyleResolver&amp;);
-    static void applyInheritWebkitAspectRatio(StyleResolver&amp;);
-    static void applyValueWebkitAspectRatio(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInitialWebkitTextEmphasisStyle(StyleResolver&amp;);
-    static void applyInheritWebkitTextEmphasisStyle(StyleResolver&amp;);
-    static void applyValueWebkitTextEmphasisStyle(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInitialCounterIncrement(StyleResolver&amp;) { }
-    static void applyInheritCounterIncrement(StyleResolver&amp;);
-    static void applyValueCounterIncrement(StyleResolver&amp;, CSSValue&amp;);
-    static void applyInitialCounterReset(StyleResolver&amp;) { }
-    static void applyInheritCounterReset(StyleResolver&amp;);
-    static void applyValueCounterReset(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInitialCursor(StyleResolver&amp;);
-    static void applyInheritCursor(StyleResolver&amp;);
-    static void applyValueCursor(StyleResolver&amp;, CSSValue&amp;);
-
-    static void applyInitialFontWeight(StyleResolver&amp;);
-    static void applyInheritFontWeight(StyleResolver&amp;);
-    static void applyValueFontWeight(StyleResolver&amp;, CSSValue&amp;);
-
</del><span class="cx"> private:
</span><span class="cx">     static void resetEffectiveZoom(StyleResolver&amp;);
</span><span class="cx">     static CSSToLengthConversionData csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp;);
</span><span class="lines">@@ -1126,6 +1080,8 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void StyleBuilderCustom::applyInitialCounterIncrement(StyleResolver&amp;) { }
+
</ins><span class="cx"> inline void StyleBuilderCustom::applyInheritCounterIncrement(StyleResolver&amp; styleResolver)
</span><span class="cx"> {
</span><span class="cx">     applyInheritCounter&lt;Increment&gt;(styleResolver);
</span><span class="lines">@@ -1136,6 +1092,8 @@
</span><span class="cx">     applyValueCounter&lt;Increment&gt;(styleResolver, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void StyleBuilderCustom::applyInitialCounterReset(StyleResolver&amp;) { }
+
</ins><span class="cx"> inline void StyleBuilderCustom::applyInheritCounterReset(StyleResolver&amp; styleResolver)
</span><span class="cx"> {
</span><span class="cx">     applyInheritCounter&lt;Reset&gt;(styleResolver);
</span></span></pre>
</div>
</div>

</body>
</html>