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

Side by Side Diff: Source/core/animation/ElementAnimations.cpp

Issue 1038193002: Clear baseLayoutStyle when the font selector version has increased. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed review issues Created 5 years, 9 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
« no previous file with comments | « Source/core/animation/ElementAnimations.h ('k') | Source/platform/fonts/Font.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/animation/ElementAnimations.h ('k') | Source/platform/fonts/Font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698