<!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 <cdumez@apple.com>
+
+ 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 <jeremyj@apple.com>
</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 "config.h"
</span><span class="cx"> #include "DeprecatedStyleBuilder.h"
</span><span class="cx">
</span><del>-#include "BasicShapeFunctions.h"
-#include "BasicShapes.h"
-#include "CSSAspectRatioValue.h"
-#include "CSSCalculationValue.h"
-#include "CSSCursorImageValue.h"
-#include "CSSImageGeneratorValue.h"
</del><span class="cx"> #include "CSSImageSetValue.h"
</span><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSPrimitiveValueMappings.h"
</span><span class="cx"> #include "CSSToStyleMap.h"
</span><span class="cx"> #include "CSSValueList.h"
</span><del>-#include "ClipPathOperation.h"
-#include "CursorList.h"
-#include "Document.h"
-#include "Frame.h"
</del><span class="cx"> #include "HTMLElement.h"
</span><del>-#include "Pair.h"
-#include "Rect.h"
</del><span class="cx"> #include "RenderStyle.h"
</span><del>-#include "RenderView.h"
-#include "Settings.h"
</del><span class="cx"> #include "StyleFontSizeFunctions.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><del>-#include <wtf/StdLibExtras.h>
</del><span class="cx">
</span><del>-#if ENABLE(CSS_SHAPES)
-#include "ShapeValue.h"
-#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 <ExpandValueBehavior expandValue, CSSPropertyID one = CSSPropertyInvalid, CSSPropertyID two = CSSPropertyInvalid, CSSPropertyID three = CSSPropertyInvalid, CSSPropertyID four = CSSPropertyInvalid, CSSPropertyID five = CSSPropertyInvalid>
-class ApplyPropertyExpanding {
</del><ins>+class ApplyPropertyPerspectiveOrigin {
</ins><span class="cx"> public:
</span><del>-
</del><span class="cx"> template <CSSPropertyID id>
</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& table = DeprecatedStyleBuilder::sharedStyleBuilder();
</span><span class="cx"> const PropertyHandler& 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<one>(propertyID, styleResolver);
- applyInheritValue<two>(propertyID, styleResolver);
- applyInheritValue<three>(propertyID, styleResolver);
- applyInheritValue<four>(propertyID, styleResolver);
- applyInheritValue<five>(propertyID, styleResolver);
</del><ins>+ applyInheritValue<CSSPropertyWebkitPerspectiveOriginX>(propertyID, styleResolver);
+ applyInheritValue<CSSPropertyWebkitPerspectiveOriginY>(propertyID, styleResolver);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <CSSPropertyID id>
</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& table = DeprecatedStyleBuilder::sharedStyleBuilder();
</span><span class="cx"> const PropertyHandler& 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<one>(propertyID, styleResolver);
- applyInitialValue<two>(propertyID, styleResolver);
- applyInitialValue<three>(propertyID, styleResolver);
- applyInitialValue<four>(propertyID, styleResolver);
- applyInitialValue<five>(propertyID, styleResolver);
</del><ins>+ applyInitialValue<CSSPropertyWebkitPerspectiveOriginX>(propertyID, styleResolver);
+ applyInitialValue<CSSPropertyWebkitPerspectiveOriginY>(propertyID, styleResolver);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- template <CSSPropertyID id>
- 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& table = DeprecatedStyleBuilder::sharedStyleBuilder();
- const PropertyHandler& 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<one>(propertyID, styleResolver, value);
- applyValue<two>(propertyID, styleResolver, value);
- applyValue<three>(propertyID, styleResolver, value);
- applyValue<four>(propertyID, styleResolver, value);
- applyValue<five>(propertyID, styleResolver, value);
- }
</del><span class="cx"> static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-template <typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()>
-class ApplyPropertyDefaultBase {
-public:
- static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); }
- static GetterType value(RenderStyle* style) { return (style->*getterFunction)(); }
- static InitialType initial() { return (*initialFunction)(); }
- static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver) { setValue(styleResolver->style(), value(styleResolver->parentStyle())); }
- static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver) { setValue(styleResolver->style(), initial()); }
- static void applyValue(CSSPropertyID, StyleResolver*, CSSValue*) { }
- static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
-};
-
</del><span class="cx"> enum AutoValueType {Number = 0, ComputeLength};
</span><span class="cx"> template <typename T, T (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(T), bool (RenderStyle::*hasAutoFunction)() const, void (RenderStyle::*setAutoFunction)(), AutoValueType valueType = Number, int autoIdentity = CSSValueAuto>
</span><span class="cx"> class ApplyPropertyAuto {
</span><span class="lines">@@ -732,7 +670,7 @@
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitMaskRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSToStyleMap::mapFillRepeatY>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer<FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSToStyleMap::mapFillSize>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitMaskSourceType, ApplyPropertyFillLayer<EMaskSourceType, CSSPropertyWebkitMaskSourceType, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isMaskSourceTypeSet, &FillLayer::maskSourceType, &FillLayer::setMaskSourceType, &FillLayer::clearMaskSourceType, &FillLayer::initialMaskSourceType, &CSSToStyleMap::mapFillMaskSourceType>::createHandler());
</span><del>- setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitPerspectiveOriginX, CSSPropertyWebkitPerspectiveOriginY>::createHandler());
</del><ins>+ setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyPerspectiveOrigin::createHandler());
</ins><span class="cx"> setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textEmphasisColor, &RenderStyle::setTextEmphasisColor, &RenderStyle::setVisitedLinkTextEmphasisColor, &RenderStyle::color>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitTextFillColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textFillColor, &RenderStyle::setTextFillColor, &RenderStyle::setVisitedLinkTextFillColor, &RenderStyle::color>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitTextStrokeColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textStrokeColor, &RenderStyle::setTextStrokeColor, &RenderStyle::setVisitedLinkTextStrokeColor, &RenderStyle::color>::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&); \
+ static void applyInitial##property(StyleResolver&); \
+ static void applyValue##property(StyleResolver&, CSSValue&)
+
</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&, CSSValue&);
-
- static void applyValueDirection(StyleResolver&, CSSValue&);
-
- static void applyInitialZoom(StyleResolver&);
- static void applyInheritZoom(StyleResolver&);
- static void applyValueZoom(StyleResolver&, CSSValue&);
-
- static void applyValueVerticalAlign(StyleResolver&, CSSValue&);
-
</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&);
- static void applyInitialImageResolution(StyleResolver&);
- static void applyValueImageResolution(StyleResolver&, CSSValue&);
-#endif // ENABLE(CSS_IMAGE_RESOLUTION)
-
- static void applyInheritSize(StyleResolver&);
- static void applyInitialSize(StyleResolver&);
- static void applyValueSize(StyleResolver&, CSSValue&);
-
- static void applyInheritTextIndent(StyleResolver&);
- static void applyInitialTextIndent(StyleResolver&);
- static void applyValueTextIndent(StyleResolver&, CSSValue&);
-
-#define DECLARE_BORDER_IMAGE_MODIFIER_HANDLER(type, modifier) \
- static void applyInherit##type##modifier(StyleResolver&); \
- static void applyInitial##type##modifier(StyleResolver&); \
- static void applyValue##type##modifier(StyleResolver&, CSSValue&)
-
- 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&, CSSValue&);
-
</del><ins>+ DECLARE_PROPERTY_CUSTOM_HANDLERS(ImageResolution);
+#endif
</ins><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><del>- static void applyInheritLineHeight(StyleResolver&);
- static void applyInitialLineHeight(StyleResolver&);
-#endif // ENABLE(IOS_TEXT_AUTOSIZING)
- static void applyValueLineHeight(StyleResolver&, CSSValue&);
</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&);
- static void applyInitialOutlineStyle(StyleResolver&);
- static void applyValueOutlineStyle(StyleResolver&, CSSValue&);
</del><ins>+ // Custom handling of inherit + value setting only.
+ static void applyInheritDisplay(StyleResolver&);
+ static void applyValueDisplay(StyleResolver&, CSSValue&);
</ins><span class="cx">
</span><del>- static void applyInitialClip(StyleResolver&);
- static void applyInheritClip(StyleResolver&);
- static void applyValueClip(StyleResolver&, CSSValue&);
-
- static void applyValueWebkitLocale(StyleResolver&, CSSValue&);
- static void applyValueWebkitWritingMode(StyleResolver&, CSSValue&);
- static void applyValueWebkitTextOrientation(StyleResolver&, CSSValue&);
</del><ins>+ // Custom handling of value setting only.
+ static void applyValueDirection(StyleResolver&, CSSValue&);
+#if !ENABLE(IOS_TEXT_AUTOSIZING)
+ static void applyValueLineHeight(StyleResolver&, CSSValue&);
+#endif
+ static void applyValueVerticalAlign(StyleResolver&, CSSValue&);
</ins><span class="cx"> static void applyValueWebkitJustifySelf(StyleResolver&, CSSValue&);
</span><ins>+ static void applyValueWebkitLocale(StyleResolver&, CSSValue&);
+ static void applyValueWebkitMarqueeIncrement(StyleResolver&, CSSValue&);
</ins><span class="cx"> static void applyValueWebkitPerspective(StyleResolver&, CSSValue&);
</span><ins>+ static void applyValueWebkitTextOrientation(StyleResolver&, CSSValue&);
+ static void applyValueWebkitWritingMode(StyleResolver&, CSSValue&);
+ static void applyValueWordSpacing(StyleResolver&, CSSValue&);
</ins><span class="cx">
</span><del>- static void applyInitialTextShadow(StyleResolver&);
- static void applyInheritTextShadow(StyleResolver&);
- static void applyValueTextShadow(StyleResolver&, CSSValue&);
- static void applyInitialBoxShadow(StyleResolver&);
- static void applyInheritBoxShadow(StyleResolver&);
- static void applyValueBoxShadow(StyleResolver&, CSSValue&);
- static void applyInitialWebkitBoxShadow(StyleResolver&);
- static void applyInheritWebkitBoxShadow(StyleResolver&);
- static void applyValueWebkitBoxShadow(StyleResolver&, CSSValue&);
-
- static void applyInitialFontFamily(StyleResolver&);
- static void applyInheritFontFamily(StyleResolver&);
- static void applyValueFontFamily(StyleResolver&, CSSValue&);
-
- static void applyInheritDisplay(StyleResolver&);
- static void applyValueDisplay(StyleResolver&, CSSValue&);
-
- static void applyInitialWebkitAspectRatio(StyleResolver&);
- static void applyInheritWebkitAspectRatio(StyleResolver&);
- static void applyValueWebkitAspectRatio(StyleResolver&, CSSValue&);
-
- static void applyInitialWebkitTextEmphasisStyle(StyleResolver&);
- static void applyInheritWebkitTextEmphasisStyle(StyleResolver&);
- static void applyValueWebkitTextEmphasisStyle(StyleResolver&, CSSValue&);
-
- static void applyInitialCounterIncrement(StyleResolver&) { }
- static void applyInheritCounterIncrement(StyleResolver&);
- static void applyValueCounterIncrement(StyleResolver&, CSSValue&);
- static void applyInitialCounterReset(StyleResolver&) { }
- static void applyInheritCounterReset(StyleResolver&);
- static void applyValueCounterReset(StyleResolver&, CSSValue&);
-
- static void applyInitialCursor(StyleResolver&);
- static void applyInheritCursor(StyleResolver&);
- static void applyValueCursor(StyleResolver&, CSSValue&);
-
- static void applyInitialFontWeight(StyleResolver&);
- static void applyInheritFontWeight(StyleResolver&);
- static void applyValueFontWeight(StyleResolver&, CSSValue&);
-
</del><span class="cx"> private:
</span><span class="cx"> static void resetEffectiveZoom(StyleResolver&);
</span><span class="cx"> static CSSToLengthConversionData csstoLengthConversionDataWithTextZoomFactor(StyleResolver&);
</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&) { }
+
</ins><span class="cx"> inline void StyleBuilderCustom::applyInheritCounterIncrement(StyleResolver& styleResolver)
</span><span class="cx"> {
</span><span class="cx"> applyInheritCounter<Increment>(styleResolver);
</span><span class="lines">@@ -1136,6 +1092,8 @@
</span><span class="cx"> applyValueCounter<Increment>(styleResolver, value);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline void StyleBuilderCustom::applyInitialCounterReset(StyleResolver&) { }
+
</ins><span class="cx"> inline void StyleBuilderCustom::applyInheritCounterReset(StyleResolver& styleResolver)
</span><span class="cx"> {
</span><span class="cx"> applyInheritCounter<Reset>(styleResolver);
</span></span></pre>
</div>
</div>
</body>
</html>