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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 14409013: Rename CSSAnimationData* -> StyleAnimationData* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 ASSERT_NOT_REACHED(); 1063 ASSERT_NOT_REACHED();
1064 return nullAtom; 1064 return nullAtom;
1065 } 1065 }
1066 1066
1067 ASSERT_NOT_REACHED(); 1067 ASSERT_NOT_REACHED();
1068 return nullAtom; 1068 return nullAtom;
1069 } 1069 }
1070 1070
1071 void RenderStyle::adjustAnimations() 1071 void RenderStyle::adjustAnimations()
1072 { 1072 {
1073 CSSAnimationDataList* animationList = rareNonInheritedData->m_animations.get (); 1073 StyleAnimationDataList* animationList = rareNonInheritedData->m_animations.g et();
1074 if (!animationList) 1074 if (!animationList)
1075 return; 1075 return;
1076 1076
1077 // Get rid of empty animations and anything beyond them 1077 // Get rid of empty animations and anything beyond them
1078 for (size_t i = 0; i < animationList->size(); ++i) { 1078 for (size_t i = 0; i < animationList->size(); ++i) {
1079 if (animationList->animation(i)->isEmpty()) { 1079 if (animationList->animation(i)->isEmpty()) {
1080 animationList->resize(i); 1080 animationList->resize(i);
1081 break; 1081 break;
1082 } 1082 }
1083 } 1083 }
1084 1084
1085 if (animationList->isEmpty()) { 1085 if (animationList->isEmpty()) {
1086 clearAnimations(); 1086 clearAnimations();
1087 return; 1087 return;
1088 } 1088 }
1089 1089
1090 // Repeat patterns into layers that don't have some properties set. 1090 // Repeat patterns into layers that don't have some properties set.
1091 animationList->fillUnsetProperties(); 1091 animationList->fillUnsetProperties();
1092 } 1092 }
1093 1093
1094 void RenderStyle::adjustTransitions() 1094 void RenderStyle::adjustTransitions()
1095 { 1095 {
1096 CSSAnimationDataList* transitionList = rareNonInheritedData->m_transitions.g et(); 1096 StyleAnimationDataList* transitionList = rareNonInheritedData->m_transitions .get();
1097 if (!transitionList) 1097 if (!transitionList)
1098 return; 1098 return;
1099 1099
1100 // Get rid of empty transitions and anything beyond them 1100 // Get rid of empty transitions and anything beyond them
1101 for (size_t i = 0; i < transitionList->size(); ++i) { 1101 for (size_t i = 0; i < transitionList->size(); ++i) {
1102 if (transitionList->animation(i)->isEmpty()) { 1102 if (transitionList->animation(i)->isEmpty()) {
1103 transitionList->resize(i); 1103 transitionList->resize(i);
1104 break; 1104 break;
1105 } 1105 }
1106 } 1106 }
(...skipping 12 matching lines...) Expand all
1119 for (size_t j = i+1; j < transitionList->size(); ++j) { 1119 for (size_t j = i+1; j < transitionList->size(); ++j) {
1120 if (transitionList->animation(i)->property() == transitionList->anim ation(j)->property()) { 1120 if (transitionList->animation(i)->property() == transitionList->anim ation(j)->property()) {
1121 // toss i 1121 // toss i
1122 transitionList->remove(i); 1122 transitionList->remove(i);
1123 j = i; 1123 j = i;
1124 } 1124 }
1125 } 1125 }
1126 } 1126 }
1127 } 1127 }
1128 1128
1129 CSSAnimationDataList* RenderStyle::accessAnimations() 1129 StyleAnimationDataList* RenderStyle::accessAnimations()
1130 { 1130 {
1131 if (!rareNonInheritedData.access()->m_animations) 1131 if (!rareNonInheritedData.access()->m_animations)
1132 rareNonInheritedData.access()->m_animations = adoptPtr(new CSSAnimationD ataList()); 1132 rareNonInheritedData.access()->m_animations = adoptPtr(new StyleAnimatio nDataList());
1133 return rareNonInheritedData->m_animations.get(); 1133 return rareNonInheritedData->m_animations.get();
1134 } 1134 }
1135 1135
1136 CSSAnimationDataList* RenderStyle::accessTransitions() 1136 StyleAnimationDataList* RenderStyle::accessTransitions()
1137 { 1137 {
1138 if (!rareNonInheritedData.access()->m_transitions) 1138 if (!rareNonInheritedData.access()->m_transitions)
1139 rareNonInheritedData.access()->m_transitions = adoptPtr(new CSSAnimation DataList()); 1139 rareNonInheritedData.access()->m_transitions = adoptPtr(new StyleAnimati onDataList());
1140 return rareNonInheritedData->m_transitions.get(); 1140 return rareNonInheritedData->m_transitions.get();
1141 } 1141 }
1142 1142
1143 const CSSAnimationData* RenderStyle::transitionForProperty(CSSPropertyID propert y) const 1143 const StyleAnimationData* RenderStyle::transitionForProperty(CSSPropertyID prope rty) const
1144 { 1144 {
1145 if (transitions()) { 1145 if (transitions()) {
1146 for (size_t i = 0; i < transitions()->size(); ++i) { 1146 for (size_t i = 0; i < transitions()->size(); ++i) {
1147 const CSSAnimationData* p = transitions()->animation(i); 1147 const StyleAnimationData* p = transitions()->animation(i);
1148 if (p->animationMode() == CSSAnimationData::AnimateAll || p->propert y() == property) { 1148 if (p->animationMode() == StyleAnimationData::AnimateAll || p->prope rty() == property) {
1149 return p; 1149 return p;
1150 } 1150 }
1151 } 1151 }
1152 } 1152 }
1153 return 0; 1153 return 0;
1154 } 1154 }
1155 1155
1156 const Font& RenderStyle::font() const { return inherited->font; } 1156 const Font& RenderStyle::font() const { return inherited->font; }
1157 const FontMetrics& RenderStyle::fontMetrics() const { return inherited->font.fon tMetrics(); } 1157 const FontMetrics& RenderStyle::fontMetrics() const { return inherited->font.fon tMetrics(); }
1158 const FontDescription& RenderStyle::fontDescription() const { return inherited-> font.fontDescription(); } 1158 const FontDescription& RenderStyle::fontDescription() const { return inherited-> font.fontDescription(); }
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 info.addMember(inherited, "inherited"); 1585 info.addMember(inherited, "inherited");
1586 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); 1586 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles");
1587 #if ENABLE(SVG) 1587 #if ENABLE(SVG)
1588 info.addMember(m_svgStyle, "svgStyle"); 1588 info.addMember(m_svgStyle, "svgStyle");
1589 #endif 1589 #endif
1590 info.addMember(inherited_flags, "inherited_flags"); 1590 info.addMember(inherited_flags, "inherited_flags");
1591 info.addMember(noninherited_flags, "noninherited_flags"); 1591 info.addMember(noninherited_flags, "noninherited_flags");
1592 } 1592 }
1593 1593
1594 } // namespace WebCore 1594 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/style/RenderStyle.h ('k') | Source/core/rendering/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698