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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2905793002: Replace pointers in ComputedStyle::*DataEquivalent functions with refs. (Closed)
Patch Set: Rebase Created 3 years, 6 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 | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | 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) 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 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // layout subtree needs to be reattached 178 // layout subtree needs to be reattached
179 if ((!old_style && new_style) || (old_style && !new_style)) 179 if ((!old_style && new_style) || (old_style && !new_style))
180 return kReattach; 180 return kReattach;
181 181
182 if (!old_style && !new_style) 182 if (!old_style && !new_style)
183 return kNoChange; 183 return kNoChange;
184 184
185 if (old_style->Display() != new_style->Display() || 185 if (old_style->Display() != new_style->Display() ||
186 old_style->HasPseudoStyle(kPseudoIdFirstLetter) != 186 old_style->HasPseudoStyle(kPseudoIdFirstLetter) !=
187 new_style->HasPseudoStyle(kPseudoIdFirstLetter) || 187 new_style->HasPseudoStyle(kPseudoIdFirstLetter) ||
188 !old_style->ContentDataEquivalent(new_style) || 188 !old_style->ContentDataEquivalent(*new_style) ||
189 old_style->HasTextCombine() != new_style->HasTextCombine()) 189 old_style->HasTextCombine() != new_style->HasTextCombine())
190 return kReattach; 190 return kReattach;
191 191
192 bool independent_equal = old_style->IndependentInheritedEqual(*new_style); 192 bool independent_equal = old_style->IndependentInheritedEqual(*new_style);
193 bool non_independent_equal = 193 bool non_independent_equal =
194 old_style->NonIndependentInheritedEqual(*new_style); 194 old_style->NonIndependentInheritedEqual(*new_style);
195 if (!independent_equal || !non_independent_equal) { 195 if (!independent_equal || !non_independent_equal) {
196 if (non_independent_equal && !old_style->HasExplicitlyInheritedProperties()) 196 if (non_independent_equal && !old_style->HasExplicitlyInheritedProperties())
197 return kIndependentInherit; 197 return kIndependentInherit;
198 return kInherit; 198 return kInherit;
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 if (value < 0) 2430 if (value < 0)
2431 fvalue -= 0.5f; 2431 fvalue -= 0.5f;
2432 else 2432 else
2433 fvalue += 0.5f; 2433 fvalue += 0.5f;
2434 } 2434 }
2435 2435
2436 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2436 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2437 } 2437 }
2438 2438
2439 } // namespace blink 2439 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698