Reviewed by Adele Peterson.
[WebKit-https.git] / WebCore / css / CSSStyleSelector.cpp
index 3deb3147c1209698ef419148f1e32f706135816f..8f7e2ca000b6edcff03e3ae8748cb81f8e1b3ac0 100644 (file)
@@ -124,18 +124,17 @@ if (isInherit) { \
         currChild->clear##Prop(); \
         currChild = currChild->next(); \
     } \
-    return; \
-} \
-if (isInitial) { \
+} else if (isInitial) { \
     LayerType* currChild = m_style->access##LayerType##s(); \
     currChild->set##Prop(RenderStyle::initial##Prop()); \
     for (currChild = currChild->next(); currChild; currChild = currChild->next()) \
         currChild->clear##Prop(); \
-    return; \
 }
 
 #define HANDLE_MULTILAYER_VALUE(layerType, LayerType, prop, Prop, value) { \
 HANDLE_MULTILAYER_INHERIT_AND_INITIAL(layerType, LayerType, prop, Prop) \
+if (isInherit || isInitial) \
+    return; \
 LayerType* currChild = m_style->access##LayerType##s(); \
 LayerType* prevChild = 0; \
 if (value->isValueList()) { \
@@ -167,9 +166,6 @@ HANDLE_MULTILAYER_INHERIT_AND_INITIAL(backgroundLayer, BackgroundLayer, prop, Pr
 #define HANDLE_BACKGROUND_VALUE(prop, Prop, value) \
 HANDLE_MULTILAYER_VALUE(backgroundLayer, BackgroundLayer, prop, Prop, value)
 
-#define HANDLE_TRANSITION_INHERIT_AND_INITIAL(prop, Prop) \
-HANDLE_MULTILAYER_INHERIT_AND_INITIAL(transition, Transition, prop, Prop)
-
 #define HANDLE_TRANSITION_VALUE(prop, Prop, value) \
 HANDLE_MULTILAYER_VALUE(transition, Transition, prop, Prop, value)