| Index: third_party/WebKit/Source/core/layout/line/LineWidth.h
|
| diff --git a/third_party/WebKit/Source/core/layout/line/LineWidth.h b/third_party/WebKit/Source/core/layout/line/LineWidth.h
|
| index 6f18faae32b95f220bfc9be723da3f6ec77a9adb..48f81fa9aa09ea3d4273c72b7ce3e993b5d02eaf 100644
|
| --- a/third_party/WebKit/Source/core/layout/line/LineWidth.h
|
| +++ b/third_party/WebKit/Source/core/layout/line/LineWidth.h
|
| @@ -46,8 +46,15 @@ class LineWidth {
|
| public:
|
| LineWidth(LineLayoutBlockFlow, bool isFirstLine, IndentTextOrNot);
|
|
|
| - bool fitsOnLine() const { return currentWidth() <= (m_availableWidth + LayoutUnit::epsilon()); }
|
| - bool fitsOnLine(float extra) const { return currentWidth() + extra <= (m_availableWidth + LayoutUnit::epsilon()); }
|
| + bool fitsOnLine() const
|
| + {
|
| + return LayoutUnit::fromFloatFloor(currentWidth()) <= m_availableWidth;
|
| + }
|
| + bool fitsOnLine(float extra) const
|
| + {
|
| + float totalWidth = currentWidth() + extra;
|
| + return LayoutUnit::fromFloatFloor(totalWidth) <= m_availableWidth;
|
| + }
|
| bool fitsOnLine(float extra, WhitespaceTreatment whitespaceTreatment) const
|
| {
|
| return currentWidth() - (whitespaceTreatment == ExcludeWhitespace ? trailingWhitespaceWidth() : 0) + extra <= (m_availableWidth + LayoutUnit::epsilon());
|
|
|