Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp

Issue 2909543003: Use unnamed namespaces instead of static functions in CSSAnimations.cpp (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
index 205ac1c3e0fd6e3946974291f6b204b18844fcb3..8bb6ba668f582116cafb31659feae4e479bb91ff 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -73,7 +73,7 @@ using PropertySet = HashSet<CSSPropertyID>;
namespace {
-static StringKeyframeEffectModel* CreateKeyframeEffectModel(
+StringKeyframeEffectModel* CreateKeyframeEffectModel(
StyleResolver* resolver,
const Element* animating_element,
Element& element,
@@ -210,7 +210,9 @@ bool CSSAnimations::IsTransitionAnimationForInspector(
return false;
}
-static const KeyframeEffectModelBase* GetKeyframeEffectModelBase(
+namespace {
+
+const KeyframeEffectModelBase* GetKeyframeEffectModelBase(
const AnimationEffectReadOnly* effect) {
if (!effect)
return nullptr;
@@ -224,6 +226,8 @@ static const KeyframeEffectModelBase* GetKeyframeEffectModelBase(
return ToKeyframeEffectModelBase(model);
}
+} // namespace
+
void CSSAnimations::CalculateCompositorAnimationUpdate(
CSSAnimationUpdate& update,
const Element* animating_element,
@@ -949,7 +953,9 @@ void CSSAnimations::Cancel() {
ClearPendingUpdate();
}
-static bool IsCustomPropertyHandle(const PropertyHandle& property) {
+namespace {
+
+bool IsCustomPropertyHandle(const PropertyHandle& property) {
return property.IsCSSCustomProperty();
}
@@ -960,12 +966,12 @@ static bool IsCustomPropertyHandle(const PropertyHandle& property) {
// the case of effect collisions.
// Example: Both 'color' and 'svg-color' set the color on ComputedStyle but are
// considered distinct properties in the ActiveInterpolationsMap.
-static bool IsStandardPropertyHandle(const PropertyHandle& property) {
+bool IsStandardPropertyHandle(const PropertyHandle& property) {
return (property.IsCSSProperty() && !property.IsCSSCustomProperty()) ||
property.IsPresentationAttribute();
}
-static void AdoptActiveAnimationInterpolations(
+void AdoptActiveAnimationInterpolations(
EffectStack* effect_stack,
CSSAnimationUpdate& update,
const HeapVector<Member<const InertEffect>>* new_animations,
@@ -984,6 +990,8 @@ static void AdoptActiveAnimationInterpolations(
standard_interpolations);
}
+} // namespace
+
void CSSAnimations::CalculateAnimationActiveInterpolations(
CSSAnimationUpdate& update,
const Element* animating_element) {
@@ -1010,7 +1018,9 @@ void CSSAnimations::CalculateAnimationActiveInterpolations(
&update.SuppressedAnimations());
}
-static EffectStack::PropertyHandleFilter PropertyFilter(
+namespace {
+
+EffectStack::PropertyHandleFilter PropertyFilter(
CSSAnimations::PropertyPass property_pass) {
if (property_pass == CSSAnimations::PropertyPass::kCustom) {
return IsCustomPropertyHandle;
@@ -1019,6 +1029,8 @@ static EffectStack::PropertyHandleFilter PropertyFilter(
return IsStandardPropertyHandle;
}
+} // namespace
+
void CSSAnimations::CalculateTransitionActiveInterpolations(
CSSAnimationUpdate& update,
PropertyPass property_pass,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698