Reviewed by Adele Peterson.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2008 06:20:53 +0000 (06:20 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2008 06:20:53 +0000 (06:20 +0000)
        - fix "background-position: inherit"

        * css/CSSStyleSelector.cpp:
        Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
        a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
        macro.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30823 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/css/CSSStyleSelector.cpp

index 7e21a1be5afee1a40033e334ed3768f266c862b0..7ed953302635825ff9d37113f0c195da4bcafd24 100644 (file)
@@ -1,3 +1,14 @@
+2008-03-05  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Adele Peterson.
+
+        - fix "background-position: inherit"
+
+        * css/CSSStyleSelector.cpp:
+        Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
+        a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
+        macro.
+
 2008-03-05  Alp Toker  <alp@atoker.com>
 
         Add a missing make dependency for derived sources to improve
 2008-03-05  Alp Toker  <alp@atoker.com>
 
         Add a missing make dependency for derived sources to improve
index 3deb3147c1209698ef419148f1e32f706135816f..8f7e2ca000b6edcff03e3ae8748cb81f8e1b3ac0 100644 (file)
@@ -124,18 +124,17 @@ if (isInherit) { \
         currChild->clear##Prop(); \
         currChild = currChild->next(); \
     } \
         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(); \
     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) \
 }
 
 #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()) { \
 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_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)
 
 #define HANDLE_TRANSITION_VALUE(prop, Prop, value) \
 HANDLE_MULTILAYER_VALUE(transition, Transition, prop, Prop, value)