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

Side by Side Diff: Source/platform/geometry/LayoutRect.h

Issue 264713015: iPhone 5c marketing site repaints incorrectly with layer squashing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar const Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/geometry/IntRect.cpp ('k') | Source/platform/geometry/LayoutRect.cpp » ('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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 LayoutRect transposedRect() const { return LayoutRect(m_location.transposedP oint(), m_size.transposedSize()); } 164 LayoutRect transposedRect() const { return LayoutRect(m_location.transposedP oint(), m_size.transposedSize()); }
165 165
166 static LayoutRect infiniteRect() 166 static LayoutRect infiniteRect()
167 { 167 {
168 // Return a rect that is slightly smaller than the true max rect to allo w pixelSnapping to round up to the nearest IntRect without overflowing. 168 // Return a rect that is slightly smaller than the true max rect to allo w pixelSnapping to round up to the nearest IntRect without overflowing.
169 return LayoutRect(LayoutUnit::nearlyMin() / 2, LayoutUnit::nearlyMin() / 2, LayoutUnit::nearlyMax(), LayoutUnit::nearlyMax()); 169 return LayoutRect(LayoutUnit::nearlyMin() / 2, LayoutUnit::nearlyMin() / 2, LayoutUnit::nearlyMax(), LayoutUnit::nearlyMax());
170 } 170 }
171 171
172 #ifndef NDEBUG 172 #ifndef NDEBUG
173 // Prints the rect to the screen. 173 // Prints the rect to the screen.
174 void show(bool showRawValue = false); 174 void show(bool showRawValue = false) const;
175 #endif 175 #endif
176 176
177 private: 177 private:
178 LayoutPoint m_location; 178 LayoutPoint m_location;
179 LayoutSize m_size; 179 LayoutSize m_size;
180 }; 180 };
181 181
182 inline LayoutRect intersection(const LayoutRect& a, const LayoutRect& b) 182 inline LayoutRect intersection(const LayoutRect& a, const LayoutRect& b)
183 { 183 {
184 LayoutRect c = a; 184 LayoutRect c = a;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 inline IntRect pixelSnappedIntRect(LayoutPoint location, LayoutSize size) 228 inline IntRect pixelSnappedIntRect(LayoutPoint location, LayoutSize size)
229 { 229 {
230 return IntRect(roundedIntPoint(location), pixelSnappedIntSize(size, location )); 230 return IntRect(roundedIntPoint(location), pixelSnappedIntSize(size, location ));
231 } 231 }
232 232
233 } // namespace WebCore 233 } // namespace WebCore
234 234
235 #endif // LayoutRect_h 235 #endif // LayoutRect_h
OLDNEW
« no previous file with comments | « Source/platform/geometry/IntRect.cpp ('k') | Source/platform/geometry/LayoutRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698