| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 ALWAYS_INLINE LayoutPoint& operator+=(LayoutPoint& a, const LayoutPoint& b) { | 103 ALWAYS_INLINE LayoutPoint& operator+=(LayoutPoint& a, const LayoutPoint& b) { |
| 104 a.move(b.x(), b.y()); | 104 a.move(b.x(), b.y()); |
| 105 return a; | 105 return a; |
| 106 } | 106 } |
| 107 | 107 |
| 108 inline LayoutPoint& operator+=(LayoutPoint& a, const IntSize& b) { | 108 inline LayoutPoint& operator+=(LayoutPoint& a, const IntSize& b) { |
| 109 a.move(b.width(), b.height()); | 109 a.move(b.width(), b.height()); |
| 110 return a; | 110 return a; |
| 111 } | 111 } |
| 112 | 112 |
| 113 ALWAYS_INLINE LayoutPoint& operator-=(LayoutPoint& a, const LayoutPoint& b) { |
| 114 a.move(-b.x(), -b.y()); |
| 115 return a; |
| 116 } |
| 117 |
| 113 ALWAYS_INLINE LayoutPoint& operator-=(LayoutPoint& a, const LayoutSize& b) { | 118 ALWAYS_INLINE LayoutPoint& operator-=(LayoutPoint& a, const LayoutSize& b) { |
| 114 a.move(-b.width(), -b.height()); | 119 a.move(-b.width(), -b.height()); |
| 115 return a; | 120 return a; |
| 116 } | 121 } |
| 117 | 122 |
| 118 inline LayoutPoint& operator-=(LayoutPoint& a, const IntSize& b) { | 123 inline LayoutPoint& operator-=(LayoutPoint& a, const IntSize& b) { |
| 119 a.move(-b.width(), -b.height()); | 124 a.move(-b.width(), -b.height()); |
| 120 return a; | 125 return a; |
| 121 } | 126 } |
| 122 | 127 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 return flooredLayoutPoint(FloatPoint(s)); | 221 return flooredLayoutPoint(FloatPoint(s)); |
| 217 } | 222 } |
| 218 | 223 |
| 219 // Redeclared here to avoid ODR issues. | 224 // Redeclared here to avoid ODR issues. |
| 220 // See platform/testing/GeometryPrinters.h. | 225 // See platform/testing/GeometryPrinters.h. |
| 221 void PrintTo(const LayoutPoint&, std::ostream*); | 226 void PrintTo(const LayoutPoint&, std::ostream*); |
| 222 | 227 |
| 223 } // namespace blink | 228 } // namespace blink |
| 224 | 229 |
| 225 #endif // LayoutPoint_h | 230 #endif // LayoutPoint_h |
| OLD | NEW |