| 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 700aef96bd08df3423fe5895456321b7f03893b8..cff94492f6c2c4f9f7ab2b1c8fb6633a41faa4f1 100644
|
| --- a/third_party/WebKit/Source/platform/LayoutUnit.h
|
| +++ b/third_party/WebKit/Source/platform/LayoutUnit.h
|
| @@ -107,8 +107,12 @@ public:
|
| }
|
| unsigned toUnsigned() const { REPORT_OVERFLOW(m_value >= 0); return toInt(); }
|
|
|
| - operator int() const { return toInt(); }
|
| - operator unsigned() const { return toUnsigned(); }
|
| + // Conversion to int or unsigned is lossy. 'explicit' on these operators won't work because
|
| + // there are also other implicit conversion paths (e.g. operator bool then to int which would
|
| + // generate wrong result). Use toInt() and toUnsigned() instead.
|
| + operator int() const = delete;
|
| + operator unsigned() const = delete;
|
| +
|
| operator double() const { return toDouble(); }
|
| operator float() const { return toFloat(); }
|
| operator bool() const { return m_value; }
|
|
|