Title: [180254] trunk/Source/WebCore
Revision
180254
Author
[email protected]
Date
2015-02-17 20:23:11 -0800 (Tue, 17 Feb 2015)

Log Message

Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
https://bugs.webkit.org/show_bug.cgi?id=141739

Reviewed by Simon Fraser.

Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
per coding style.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::singleton):
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
(WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::getPropertyAtIndex):
(WebCore::CSSPropertyAnimation::getNumProperties):
(WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (180253 => 180254)


--- trunk/Source/WebCore/ChangeLog	2015-02-18 04:17:45 UTC (rev 180253)
+++ trunk/Source/WebCore/ChangeLog	2015-02-18 04:23:11 UTC (rev 180254)
@@ -1,3 +1,23 @@
+2015-02-17  Chris Dumez  <[email protected]>
+
+        Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
+        https://bugs.webkit.org/show_bug.cgi?id=141739
+
+        Reviewed by Simon Fraser.
+
+        Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
+        per coding style.
+
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::CSSPropertyAnimationWrapperMap::singleton):
+        (WebCore::CSSPropertyAnimation::blendProperties):
+        (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
+        (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
+        (WebCore::CSSPropertyAnimation::propertiesEqual):
+        (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
+        (WebCore::CSSPropertyAnimation::getNumProperties):
+        (WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.
+
 2015-02-17  David Kilzer  <[email protected]>
 
         REGRESSION (r180224): Remove unused generate-export-file script

Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (180253 => 180254)


--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2015-02-18 04:17:45 UTC (rev 180253)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2015-02-18 04:23:11 UTC (rev 180254)
@@ -1108,7 +1108,7 @@
 
 class CSSPropertyAnimationWrapperMap {
 public:
-    static CSSPropertyAnimationWrapperMap& instance()
+    static CSSPropertyAnimationWrapperMap& singleton()
     {
         // FIXME: This data is never destroyed. Maybe we should ref count it and toss it when the last AnimationController is destroyed?
         static NeverDestroyed<CSSPropertyAnimationWrapperMap> map;
@@ -1140,6 +1140,8 @@
 
 private:
     CSSPropertyAnimationWrapperMap();
+    ~CSSPropertyAnimationWrapperMap() = delete;
+
     unsigned char& indexFromPropertyID(CSSPropertyID propertyID)
     {
         return m_propertyToIdMap[propertyID - firstCSSProperty];
@@ -1399,7 +1401,7 @@
 {
     ASSERT(prop != CSSPropertyInvalid);
 
-    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::instance().wrapperForProperty(prop);
+    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     if (wrapper) {
         wrapper->blend(anim, dst, a, b, progress);
         return !wrapper->animationIsAccelerated() || !anim->isAccelerated();
@@ -1410,14 +1412,14 @@
 
 bool CSSPropertyAnimation::animationOfPropertyIsAccelerated(CSSPropertyID prop)
 {
-    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::instance().wrapperForProperty(prop);
+    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     return wrapper ? wrapper->animationIsAccelerated() : false;
 }
 
 // Note: this is inefficient. It's only called from pauseTransitionAtTime().
 HashSet<CSSPropertyID> CSSPropertyAnimation::animatableShorthandsAffectingProperty(CSSPropertyID property)
 {
-    CSSPropertyAnimationWrapperMap& map = CSSPropertyAnimationWrapperMap::instance();
+    CSSPropertyAnimationWrapperMap& map = CSSPropertyAnimationWrapperMap::singleton();
 
     HashSet<CSSPropertyID> foundProperties;
     for (unsigned i = 0; i < map.size(); ++i)
@@ -1428,7 +1430,7 @@
 
 bool CSSPropertyAnimation::propertiesEqual(CSSPropertyID prop, const RenderStyle* a, const RenderStyle* b)
 {
-    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::instance().wrapperForProperty(prop);
+    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     if (wrapper)
         return wrapper->equals(a, b);
     return true;
@@ -1436,7 +1438,7 @@
 
 CSSPropertyID CSSPropertyAnimation::getPropertyAtIndex(int i, bool& isShorthand)
 {
-    CSSPropertyAnimationWrapperMap& map = CSSPropertyAnimationWrapperMap::instance();
+    CSSPropertyAnimationWrapperMap& map = CSSPropertyAnimationWrapperMap::singleton();
 
     if (i < 0 || static_cast<unsigned>(i) >= map.size())
         return CSSPropertyInvalid;
@@ -1448,7 +1450,7 @@
 
 int CSSPropertyAnimation::getNumProperties()
 {
-    return CSSPropertyAnimationWrapperMap::instance().size();
+    return CSSPropertyAnimationWrapperMap::singleton().size();
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to