| OLD | NEW | 
|---|
| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 84     void clampNegativeToZero() | 84     void clampNegativeToZero() | 
| 85     { | 85     { | 
| 86         *this = expandedTo(zero()); | 86         *this = expandedTo(zero()); | 
| 87     } | 87     } | 
| 88 | 88 | 
| 89     LayoutPoint transposedPoint() const | 89     LayoutPoint transposedPoint() const | 
| 90     { | 90     { | 
| 91         return LayoutPoint(m_y, m_x); | 91         return LayoutPoint(m_y, m_x); | 
| 92     } | 92     } | 
| 93 | 93 | 
| 94 #ifndef NDEBUG |  | 
| 95     String toString() const; | 94     String toString() const; | 
| 96 #endif |  | 
| 97 | 95 | 
| 98 private: | 96 private: | 
| 99     LayoutUnit m_x, m_y; | 97     LayoutUnit m_x, m_y; | 
| 100 }; | 98 }; | 
| 101 | 99 | 
| 102 ALWAYS_INLINE LayoutPoint& operator+=(LayoutPoint& a, const LayoutSize& b) | 100 ALWAYS_INLINE LayoutPoint& operator+=(LayoutPoint& a, const LayoutSize& b) | 
| 103 { | 101 { | 
| 104     a.move(b.width(), b.height()); | 102     a.move(b.width(), b.height()); | 
| 105     return a; | 103     return a; | 
| 106 } | 104 } | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 237 inline LayoutSize toLayoutSize(const LayoutPoint& p) | 235 inline LayoutSize toLayoutSize(const LayoutPoint& p) | 
| 238 { | 236 { | 
| 239     return LayoutSize(p.x(), p.y()); | 237     return LayoutSize(p.x(), p.y()); | 
| 240 } | 238 } | 
| 241 | 239 | 
| 242 inline LayoutPoint flooredLayoutPoint(const FloatSize& s) | 240 inline LayoutPoint flooredLayoutPoint(const FloatSize& s) | 
| 243 { | 241 { | 
| 244     return flooredLayoutPoint(FloatPoint(s)); | 242     return flooredLayoutPoint(FloatPoint(s)); | 
| 245 } | 243 } | 
| 246 | 244 | 
|  | 245 // Redeclared here to avoid ODR issues. | 
|  | 246 // See platform/testing/GeometryPrinters.h. | 
|  | 247 void PrintTo(const LayoutPoint&, std::ostream*); | 
|  | 248 | 
| 247 } // namespace blink | 249 } // namespace blink | 
| 248 | 250 | 
| 249 #endif // LayoutPoint_h | 251 #endif // LayoutPoint_h | 
| OLD | NEW | 
|---|