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

Side by Side Diff: Source/platform/LayoutUnit.h

Issue 1177123003: Revert "Implement a Hit Test Cache for same point hits." (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « Source/core/testing/Internals.idl ('k') | Source/platform/geometry/LayoutRect.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) 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 bool mightBeSaturated() const 165 bool mightBeSaturated() const
166 { 166 {
167 return rawValue() == std::numeric_limits<int>::max() 167 return rawValue() == std::numeric_limits<int>::max()
168 || rawValue() == std::numeric_limits<int>::min(); 168 || rawValue() == std::numeric_limits<int>::min();
169 } 169 }
170 170
171 static float epsilon() { return 1.0f / kFixedPointDenominator; } 171 static float epsilon() { return 1.0f / kFixedPointDenominator; }
172 172
173 static const LayoutUnit epsilonUnit()
174 {
175 LayoutUnit m;
176 m.m_value = 1;
177 return m;
178 }
179
180 static const LayoutUnit max() 173 static const LayoutUnit max()
181 { 174 {
182 LayoutUnit m; 175 LayoutUnit m;
183 m.m_value = std::numeric_limits<int>::max(); 176 m.m_value = std::numeric_limits<int>::max();
184 return m; 177 return m;
185 } 178 }
186 static const LayoutUnit min() 179 static const LayoutUnit min()
187 { 180 {
188 LayoutUnit m; 181 LayoutUnit m;
189 m.m_value = std::numeric_limits<int>::min(); 182 m.m_value = std::numeric_limits<int>::min();
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 if (value >= max) 789 if (value >= max)
797 return max; 790 return max;
798 if (value <= min) 791 if (value <= min)
799 return min; 792 return min;
800 return value; 793 return value;
801 } 794 }
802 795
803 } // namespace blink 796 } // namespace blink
804 797
805 #endif // LayoutUnit_h 798 #endif // LayoutUnit_h
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/platform/geometry/LayoutRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698