OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 { | 85 { |
86 #if ENABLE(OILPAN) | 86 #if ENABLE(OILPAN) |
87 visitor->trace(m_cssAnimations); | 87 visitor->trace(m_cssAnimations); |
88 visitor->trace(m_defaultStack); | 88 visitor->trace(m_defaultStack); |
89 visitor->trace(m_players); | 89 visitor->trace(m_players); |
90 #endif | 90 #endif |
91 } | 91 } |
92 | 92 |
93 const LayoutStyle* ElementAnimations::baseLayoutStyle() const | 93 const LayoutStyle* ElementAnimations::baseLayoutStyle() const |
94 { | 94 { |
95 #if !ENABLE(ASSERT) | |
96 if (isAnimationStyleChange()) | |
97 return m_baseLayoutStyle.get(); | |
98 #endif | |
99 return nullptr; | 95 return nullptr; |
100 } | 96 } |
101 | 97 |
102 void ElementAnimations::updateBaseLayoutStyle(const LayoutStyle* layoutStyle) | 98 void ElementAnimations::updateBaseLayoutStyle(const LayoutStyle* layoutStyle) |
103 { | 99 { |
104 if (!isAnimationStyleChange()) { | 100 if (!isAnimationStyleChange()) { |
105 m_baseLayoutStyle = nullptr; | 101 m_baseLayoutStyle = nullptr; |
106 return; | 102 return; |
107 } | 103 } |
108 #if ENABLE(ASSERT) | 104 if (m_baseLayoutStyle && layoutStyle) { |
109 if (m_baseLayoutStyle && layoutStyle) | 105 RELEASE_ASSERT(*m_baseLayoutStyle == *layoutStyle); |
110 ASSERT(*m_baseLayoutStyle == *layoutStyle); | 106 return; |
111 #endif | 107 } |
112 m_baseLayoutStyle = LayoutStyle::clone(*layoutStyle); | 108 m_baseLayoutStyle = LayoutStyle::clone(*layoutStyle); |
113 } | 109 } |
114 | 110 |
115 void ElementAnimations::clearBaseLayoutStyle() | 111 void ElementAnimations::clearBaseLayoutStyle() |
116 { | 112 { |
117 m_baseLayoutStyle = nullptr; | 113 m_baseLayoutStyle = nullptr; |
118 } | 114 } |
119 | 115 |
120 } // namespace blink | 116 } // namespace blink |
OLD | NEW |