[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

antti at apple.com antti at apple.com
Mon Feb 21 00:11:17 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 2df533337a30691ff10ea210443335f3ba0de9e8
Author: antti at apple.com <antti at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 28 20:15:28 2011 +0000

    Remove dead code that tried to map from CSS values to parser values
    https://bugs.webkit.org/show_bug.cgi?id=53318
    
    Reviewed by Dan Bernstein.
    
    * css/CSSFunctionValue.cpp:
    * css/CSSFunctionValue.h:
    * css/CSSPrimitiveValue.cpp:
    * css/CSSPrimitiveValue.h:
    * css/CSSValue.h:
    * css/CSSValueList.cpp:
    * css/CSSValueList.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index bf1703a..7515a32 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2011-01-28  Antti Koivisto  <antti at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Remove dead code that tried to map from CSS values to parser values
+        https://bugs.webkit.org/show_bug.cgi?id=53318
+
+        * css/CSSFunctionValue.cpp:
+        * css/CSSFunctionValue.h:
+        * css/CSSPrimitiveValue.cpp:
+        * css/CSSPrimitiveValue.h:
+        * css/CSSValue.h:
+        * css/CSSValueList.cpp:
+        * css/CSSValueList.h:
+
 2011-01-28  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/Source/WebCore/css/CSSFunctionValue.cpp b/Source/WebCore/css/CSSFunctionValue.cpp
index 70e8174..52a2953 100644
--- a/Source/WebCore/css/CSSFunctionValue.cpp
+++ b/Source/WebCore/css/CSSFunctionValue.cpp
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "CSSFunctionValue.h"
 
+#include "CSSParserValues.h"
 #include "CSSValueList.h"
 #include <wtf/PassOwnPtr.h>
 
@@ -51,18 +52,4 @@ String CSSFunctionValue::cssText() const
     return result;
 }
 
-CSSParserValue CSSFunctionValue::parserValue() const
-{
-    CSSParserValue val;
-    val.id = 0;
-    val.isInt = false;
-    val.unit = CSSParserValue::Function;
-    val.function = new CSSParserFunction;
-    val.function->name.characters = const_cast<UChar*>(m_name.characters());
-    val.function->name.length = m_name.length();
-    if (m_args)
-        val.function->args = m_args->createParserValueList();
-    return val;
-}
-
 }
diff --git a/Source/WebCore/css/CSSFunctionValue.h b/Source/WebCore/css/CSSFunctionValue.h
index 1d73f33..be38206 100644
--- a/Source/WebCore/css/CSSFunctionValue.h
+++ b/Source/WebCore/css/CSSFunctionValue.h
@@ -44,8 +44,6 @@ public:
     
     virtual String cssText() const;
 
-    virtual CSSParserValue parserValue() const;
-
 private:
     explicit CSSFunctionValue(CSSParserFunction*);
     
diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp
index 4fffc76..8d7c77b 100644
--- a/Source/WebCore/css/CSSPrimitiveValue.cpp
+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp
@@ -914,81 +914,6 @@ String CSSPrimitiveValue::cssText() const
     return text;
 }
 
-CSSParserValue CSSPrimitiveValue::parserValue() const
-{
-    // We only have to handle a subset of types.
-    CSSParserValue value;
-    value.id = 0;
-    value.isInt = false;
-    value.unit = CSSPrimitiveValue::CSS_IDENT;
-    switch (m_type) {
-        case CSS_NUMBER:
-        case CSS_PERCENTAGE:
-        case CSS_EMS:
-        case CSS_EXS:
-        case CSS_REMS:
-        case CSS_PX:
-        case CSS_CM:
-        case CSS_MM:
-        case CSS_IN:
-        case CSS_PT:
-        case CSS_PC:
-        case CSS_DEG:
-        case CSS_RAD:
-        case CSS_GRAD:
-        case CSS_MS:
-        case CSS_S:
-        case CSS_HZ:
-        case CSS_KHZ:
-        case CSS_DIMENSION:
-        case CSS_TURN:
-            value.fValue = m_value.num;
-            value.unit = m_type;
-            break;
-        case CSS_STRING:
-        case CSS_URI:
-        case CSS_PARSER_HEXCOLOR:
-            value.string.characters = const_cast<UChar*>(m_value.string->characters());
-            value.string.length = m_value.string->length();
-            value.unit = m_type;
-            break;
-        case CSS_IDENT: {
-            value.id = m_value.ident;
-            const AtomicString& name = valueOrPropertyName(m_value.ident);
-            value.string.characters = const_cast<UChar*>(name.characters());
-            value.string.length = name.length();
-            break;
-        }
-        case CSS_PARSER_OPERATOR:
-            value.iValue = m_value.ident;
-            value.unit = CSSParserValue::Operator;
-            break;
-        case CSS_PARSER_INTEGER:
-            value.fValue = m_value.num;
-            value.unit = CSSPrimitiveValue::CSS_NUMBER;
-            value.isInt = true;
-            break;
-        case CSS_PARSER_IDENTIFIER:
-            value.string.characters = const_cast<UChar*>(m_value.string->characters());
-            value.string.length = m_value.string->length();
-            value.unit = CSSPrimitiveValue::CSS_IDENT;
-            break;
-        case CSS_UNKNOWN:
-        case CSS_ATTR:
-        case CSS_COUNTER:
-        case CSS_RECT:
-        case CSS_RGBCOLOR:
-        case CSS_PAIR:
-#if ENABLE(DASHBOARD_SUPPORT)
-        case CSS_DASHBOARD_REGION:
-#endif
-            ASSERT_NOT_REACHED();
-            break;
-    }
-    
-    return value;
-}
-
 void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const CSSStyleSheet* styleSheet)
 {
     if (m_type == CSS_URI)
diff --git a/Source/WebCore/css/CSSPrimitiveValue.h b/Source/WebCore/css/CSSPrimitiveValue.h
index e12cd4c..c9892e8 100644
--- a/Source/WebCore/css/CSSPrimitiveValue.h
+++ b/Source/WebCore/css/CSSPrimitiveValue.h
@@ -185,8 +185,6 @@ public:
 
     virtual bool isQuirkValue() { return false; }
 
-    virtual CSSParserValue parserValue() const;
-
     virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*);
 
 protected:
diff --git a/Source/WebCore/css/CSSValue.h b/Source/WebCore/css/CSSValue.h
index d1464ca..e8053fe 100644
--- a/Source/WebCore/css/CSSValue.h
+++ b/Source/WebCore/css/CSSValue.h
@@ -21,7 +21,6 @@
 #ifndef CSSValue_h
 #define CSSValue_h
 
-#include "CSSParserValues.h"
 #include "KURLHash.h"
 #include <wtf/ListHashSet.h>
 #include <wtf/RefPtr.h>
@@ -70,8 +69,6 @@ public:
     virtual bool isSVGPaint() const { return false; }
 #endif
 
-    virtual CSSParserValue parserValue() const { ASSERT_NOT_REACHED(); return CSSParserValue(); }
-
     virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*) { }
 };
 
diff --git a/Source/WebCore/css/CSSValueList.cpp b/Source/WebCore/css/CSSValueList.cpp
index f8d8457..e107fb4 100644
--- a/Source/WebCore/css/CSSValueList.cpp
+++ b/Source/WebCore/css/CSSValueList.cpp
@@ -120,17 +120,6 @@ String CSSValueList::cssText() const
     return result;
 }
 
-PassOwnPtr<CSSParserValueList> CSSValueList::createParserValueList() const
-{
-    size_t size = m_values.size();
-    if (!size)
-        return 0;
-    OwnPtr<CSSParserValueList> result = adoptPtr(new CSSParserValueList);
-    for (size_t i = 0; i < size; ++i)
-        result->addValue(m_values[i]->parserValue());
-    return result.release();
-}
-
 void CSSValueList::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const CSSStyleSheet* styleSheet)
 {
     size_t size = m_values.size();
diff --git a/Source/WebCore/css/CSSValueList.h b/Source/WebCore/css/CSSValueList.h
index 0d5c882..b2e6063 100644
--- a/Source/WebCore/css/CSSValueList.h
+++ b/Source/WebCore/css/CSSValueList.h
@@ -58,8 +58,6 @@ public:
 
     virtual String cssText() const;
 
-    PassOwnPtr<CSSParserValueList> createParserValueList() const;
-
     virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*);
 
 protected:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list