Reviewed by Hyatt
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Oct 2004 00:10:47 +0000 (00:10 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Oct 2004 00:10:47 +0000 (00:10 +0000)
        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::merge): A little cleanup. Also, make sure m_lstValues
        is non-null before appending.

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/css_valueimpl.cpp

index 2537ff3ab8b5c4e228e8edbfafdb373704e44df7..bfa50b0f2dadbc817a49adbdc2d03bc004be8197 100644 (file)
@@ -1,3 +1,11 @@
+2004-10-13  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Hyatt
+
+        * khtml/css/css_valueimpl.cpp:
+        (CSSStyleDeclarationImpl::merge): A little cleanup. Also, make sure m_lstValues
+        is non-null before appending.
+
 2004-10-13  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by me
index cdfde96b7824e26c30c550ac72a2fc6bb44be86d..151b136c35d8af099f40142cc954757e5fd04748 100644 (file)
@@ -415,11 +415,12 @@ void CSSStyleDeclarationImpl::merge(CSSStyleDeclarationImpl *other, bool argOver
             if (!argOverridesOnConflict)
                 continue;
             removeProperty(property->id());
-            m_lstValues->append(new CSSProperty(*property));
         }
-        else {
-            m_lstValues->append(new CSSProperty(*property));
+        if (!m_lstValues) {
+            m_lstValues = new QPtrList<CSSProperty>;
+            m_lstValues->setAutoDelete(true);
         }
+        m_lstValues->append(new CSSProperty(*property));
     }
 }