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

Side by Side Diff: Source/WebCore/platform/FractionalLayoutUnit.h

Issue 10828136: Merge 121709 - LayoutUnit::epsilon() is wrong (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 4 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 | « no previous file | 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) 2012, Google Inc. All rights reserved. 2 * Copyright (c) 2012, 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 #else 146 #else
147 return m_value; 147 return m_value;
148 #endif 148 #endif
149 } 149 }
150 150
151 int floor() const 151 int floor() const
152 { 152 {
153 return toInt(); 153 return toInt();
154 } 154 }
155 155
156 static float epsilon() { return 1 / kFixedPointDenominator; } 156 static float epsilon() { return 1.0f / kFixedPointDenominator; }
157 static const FractionalLayoutUnit max() 157 static const FractionalLayoutUnit max()
158 { 158 {
159 FractionalLayoutUnit m; 159 FractionalLayoutUnit m;
160 m.m_value = std::numeric_limits<int>::max(); 160 m.m_value = std::numeric_limits<int>::max();
161 return m; 161 return m;
162 } 162 }
163 static const FractionalLayoutUnit min() 163 static const FractionalLayoutUnit min()
164 { 164 {
165 FractionalLayoutUnit m; 165 FractionalLayoutUnit m;
166 m.m_value = std::numeric_limits<int>::min(); 166 m.m_value = std::numeric_limits<int>::min();
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 float v; 616 float v;
617 stream >> v; 617 stream >> v;
618 value = v; 618 value = v;
619 return stream; 619 return stream;
620 } 620 }
621 #endif 621 #endif
622 622
623 } // namespace WebCore 623 } // namespace WebCore
624 624
625 #endif // FractionalLayoutUnit_h 625 #endif // FractionalLayoutUnit_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698