Title: [104369] trunk/Source/WebCore
Revision
104369
Author
[email protected]
Date
2012-01-06 18:43:54 -0800 (Fri, 06 Jan 2012)

Log Message

Roll out r104362 since it broke the build.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (104368 => 104369)


--- trunk/Source/WebCore/ChangeLog	2012-01-07 02:39:16 UTC (rev 104368)
+++ trunk/Source/WebCore/ChangeLog	2012-01-07 02:43:54 UTC (rev 104369)
@@ -47,20 +47,6 @@
         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
         Ditto.
 
-2012-01-06  Caio Marcelo de Oliveira Filho  <[email protected]>
-
-        Use HashMap<OwnPtr> in SVGAttributeToPropertyMap
-        https://bugs.webkit.org/show_bug.cgi?id=75734
-
-        Reviewed by Daniel Bates.
-
-        * svg/properties/SVGAttributeToPropertyMap.cpp:
-        (WebCore::SVGAttributeToPropertyMap::addProperties):
-        (WebCore::SVGAttributeToPropertyMap::addProperty): use HashMap::add() to avoid an
-        extra hash lookup to set a new PropertiesVector.
-        (WebCore::SVGAttributeToPropertyMap::synchronizeProperties):
-        * svg/properties/SVGAttributeToPropertyMap.h:
-
 2012-01-06  Greg Billock  <[email protected]>
 
         WebCore implementation of the Intent object

Modified: trunk/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.cpp (104368 => 104369)


--- trunk/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.cpp	2012-01-07 02:39:16 UTC (rev 104368)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.cpp	2012-01-07 02:43:54 UTC (rev 104369)
@@ -31,7 +31,7 @@
 {
     AttributeToPropertiesMap::iterator end = map.m_map.end();
     for (AttributeToPropertiesMap::iterator it = map.m_map.begin(); it != end; ++it) {
-        PropertiesVector* vector = it->second.get();
+        PropertiesVector* vector = it->second;
         ASSERT(vector);
 
         PropertiesVector::iterator vectorEnd = vector->end();
@@ -44,10 +44,13 @@
 {
     ASSERT(info);
     ASSERT(info->attributeName != anyQName());
-    OwnPtr<PropertiesVector>& vector = m_map.add(info->attributeName, nullptr).first->second;
-    if (!vector)
-        vector = adoptPtr(new PropertiesVector);
+    if (PropertiesVector* vector = m_map.get(info->attributeName)) {
+        vector->append(info);
+        return;
+    }
+    PropertiesVector* vector = new PropertiesVector;
     vector->append(info);
+    m_map.set(info->attributeName, vector);
 }
 
 void SVGAttributeToPropertyMap::animatedPropertiesForAttribute(SVGElement* ownerType, const QualifiedName& attributeName, Vector<RefPtr<SVGAnimatedProperty> >& properties)
@@ -78,7 +81,7 @@
     ASSERT(contextElement);
     AttributeToPropertiesMap::iterator end = m_map.end();
     for (AttributeToPropertiesMap::iterator it = m_map.begin(); it != end; ++it) {
-        PropertiesVector* vector = it->second.get();
+        PropertiesVector* vector = it->second;
         ASSERT(vector);
 
         PropertiesVector::iterator vectorEnd = vector->end();

Modified: trunk/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h (104368 => 104369)


--- trunk/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h	2012-01-07 02:39:16 UTC (rev 104368)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h	2012-01-07 02:43:54 UTC (rev 104369)
@@ -33,6 +33,9 @@
 
 class SVGAttributeToPropertyMap {
 public:
+    SVGAttributeToPropertyMap() { }
+    ~SVGAttributeToPropertyMap() { deleteAllValues(m_map); }
+
     bool isEmpty() const { return m_map.isEmpty(); }
 
     void addProperties(SVGAttributeToPropertyMap&);
@@ -49,7 +52,7 @@
     PassRefPtr<SVGAnimatedProperty> animatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, const SVGPropertyInfo*);
 
     typedef Vector<const SVGPropertyInfo*> PropertiesVector;
-    typedef HashMap<QualifiedName, OwnPtr<PropertiesVector> > AttributeToPropertiesMap;
+    typedef HashMap<QualifiedName, PropertiesVector*> AttributeToPropertiesMap;
     AttributeToPropertiesMap m_map;
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to