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

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

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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/core/paint/VideoPainter.cpp ('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) 2003, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2005 Nokia. All rights reserved. 3 * Copyright (C) 2005 Nokia. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 InsideOrOnStroke, 53 InsideOrOnStroke,
54 InsideButNotOnStroke 54 InsideButNotOnStroke
55 }; 55 };
56 56
57 FloatRect() { } 57 FloatRect() { }
58 FloatRect(const FloatPoint& location, const FloatSize& size) 58 FloatRect(const FloatPoint& location, const FloatSize& size)
59 : m_location(location), m_size(size) { } 59 : m_location(location), m_size(size) { }
60 FloatRect(float x, float y, float width, float height) 60 FloatRect(float x, float y, float width, float height)
61 : m_location(FloatPoint(x, y)), m_size(FloatSize(width, height)) { } 61 : m_location(FloatPoint(x, y)), m_size(FloatSize(width, height)) { }
62 FloatRect(const IntRect&); 62 FloatRect(const IntRect&);
63 FloatRect(const LayoutRect&); 63 explicit FloatRect(const LayoutRect&);
64 FloatRect(const SkRect&); 64 FloatRect(const SkRect&);
65 65
66 static FloatRect narrowPrecision(double x, double y, double width, double he ight); 66 static FloatRect narrowPrecision(double x, double y, double width, double he ight);
67 67
68 FloatPoint location() const { return m_location; } 68 FloatPoint location() const { return m_location; }
69 FloatSize size() const { return m_size; } 69 FloatSize size() const { return m_size; }
70 70
71 void setLocation(const FloatPoint& location) { m_location = location; } 71 void setLocation(const FloatPoint& location) { m_location = location; }
72 void setSize(const FloatSize& size) { m_size = size; } 72 void setSize(const FloatSize& size) { m_size = size; }
73 73
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Map supplied rect from srcRect to an equivalent rect in destRect. 246 // Map supplied rect from srcRect to an equivalent rect in destRect.
247 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co nst FloatRect& destRect); 247 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co nst FloatRect& destRect);
248 248
249 // Redeclared here to avoid ODR issues. 249 // Redeclared here to avoid ODR issues.
250 // See platform/testing/GeometryPrinters.h. 250 // See platform/testing/GeometryPrinters.h.
251 void PrintTo(const FloatRect&, std::ostream*); 251 void PrintTo(const FloatRect&, std::ostream*);
252 252
253 } // namespace blink 253 } // namespace blink
254 254
255 #endif 255 #endif
OLDNEW
« no previous file with comments | « Source/core/paint/VideoPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698