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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ASSERT(*m_baseLayoutStyle == *layoutStyle); | 110 ASSERT(*m_baseLayoutStyle == *layoutStyle); |
111 #endif | 111 #endif |
112 m_baseLayoutStyle = LayoutStyle::clone(*layoutStyle); | 112 m_baseLayoutStyle = LayoutStyle::clone(*layoutStyle); |
113 } | 113 } |
114 | 114 |
115 void ElementAnimations::clearBaseLayoutStyle() | 115 void ElementAnimations::clearBaseLayoutStyle() |
116 { | 116 { |
117 m_baseLayoutStyle = nullptr; | 117 m_baseLayoutStyle = nullptr; |
118 } | 118 } |
119 | 119 |
| 120 bool ElementAnimations::isAnimationStyleChange() const |
| 121 { |
| 122 // TODO(rune@opera.com): The FontFaceCache version number may be increased w
ithout forcing |
| 123 // a style recalc (see crbug.com/471079). LayoutStyle objects created with d
ifferent cache |
| 124 // versions will not be considered equal as Font::operator== will compare ve
rsions, hence |
| 125 // LayoutStyle::operator== will return false. We avoid using baseLayoutStyle
(the check for |
| 126 // isFallbackValid()) in that case to avoid triggering the LayoutStyle compa
rison ASSERT |
| 127 // in updateBaseLayoutStyle. |
| 128 return m_animationStyleChange && (!m_baseLayoutStyle || m_baseLayoutStyle->f
ont().isFallbackValid()); |
| 129 } |
| 130 |
120 } // namespace blink | 131 } // namespace blink |
OLD | NEW |