| Index: third_party/WebKit/Source/platform/LayoutUnit.h
|
| diff --git a/third_party/WebKit/Source/platform/LayoutUnit.h b/third_party/WebKit/Source/platform/LayoutUnit.h
|
| index 552ec0495cd4a9749a89f3bd050ba7c4a390996b..cf69ae772328999b33a03b5d4dfe48765adc62ef 100644
|
| --- a/third_party/WebKit/Source/platform/LayoutUnit.h
|
| +++ b/third_party/WebKit/Source/platform/LayoutUnit.h
|
| @@ -65,6 +65,7 @@ class LayoutUnit {
|
| DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
| public:
|
| LayoutUnit() : m_value(0) { }
|
| + // TODO(leviw): All of the below constructors should be explicit. crbug.com/581254
|
| LayoutUnit(int value) { setValue(value); }
|
| LayoutUnit(unsigned short value) { setValue(value); }
|
| LayoutUnit(unsigned value) { setValue(value); }
|
| @@ -678,13 +679,13 @@ inline LayoutUnit& operator+=(LayoutUnit& a, const LayoutUnit& b)
|
|
|
| inline LayoutUnit& operator+=(LayoutUnit& a, int b)
|
| {
|
| - a = a + b;
|
| + a = a + LayoutUnit(b);
|
| return a;
|
| }
|
|
|
| inline LayoutUnit& operator+=(LayoutUnit& a, float b)
|
| {
|
| - a = a + b;
|
| + a = a + LayoutUnit(b);
|
| return a;
|
| }
|
|
|
| @@ -696,7 +697,7 @@ inline float& operator+=(float& a, const LayoutUnit& b)
|
|
|
| inline LayoutUnit& operator-=(LayoutUnit& a, int b)
|
| {
|
| - a = a - b;
|
| + a = a - LayoutUnit(b);
|
| return a;
|
| }
|
|
|
| @@ -708,7 +709,7 @@ inline LayoutUnit& operator-=(LayoutUnit& a, const LayoutUnit& b)
|
|
|
| inline LayoutUnit& operator-=(LayoutUnit& a, float b)
|
| {
|
| - a = a - b;
|
| + a = LayoutUnit(a - b);
|
| return a;
|
| }
|
|
|
| @@ -723,11 +724,10 @@ inline LayoutUnit& operator*=(LayoutUnit& a, const LayoutUnit& b)
|
| a = a * b;
|
| return a;
|
| }
|
| -// operator*=(LayoutUnit& a, int b) is supported by the operator above plus LayoutUnit(int).
|
|
|
| inline LayoutUnit& operator*=(LayoutUnit& a, float b)
|
| {
|
| - a = a * b;
|
| + a = LayoutUnit(a * b);
|
| return a;
|
| }
|
|
|
| @@ -742,11 +742,10 @@ inline LayoutUnit& operator/=(LayoutUnit& a, const LayoutUnit& b)
|
| a = a / b;
|
| return a;
|
| }
|
| -// operator/=(LayoutUnit& a, int b) is supported by the operator above plus LayoutUnit(int).
|
|
|
| inline LayoutUnit& operator/=(LayoutUnit& a, float b)
|
| {
|
| - a = a / b;
|
| + a = LayoutUnit(a / b);
|
| return a;
|
| }
|
|
|
|
|