Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: third_party/WebKit/Source/core/layout/line/LineWidth.h

Issue 2026073002: Restore epsilon tolerance in LineWidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/sub-pixel/button-span-wrap-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 347cfd6ec193b482fdc1fbb08a74d7ae4f29b78a..4c0d4696f5f5deaeda20326690a5214f4426eac9 100644
--- a/third_party/WebKit/Source/core/layout/line/LineWidth.h
+++ b/third_party/WebKit/Source/core/layout/line/LineWidth.h
@@ -48,12 +48,12 @@ public:
bool fitsOnLine() const
{
- return LayoutUnit::fromFloatFloor(currentWidth()) <= m_availableWidth;
+ return LayoutUnit::fromFloatFloor(currentWidth()) <= m_availableWidth + LayoutUnit::epsilon();
}
bool fitsOnLine(float extra) const
{
float totalWidth = currentWidth() + extra;
- return LayoutUnit::fromFloatFloor(totalWidth) <= m_availableWidth;
+ return LayoutUnit::fromFloatFloor(totalWidth) <= m_availableWidth + LayoutUnit::epsilon();
}
bool fitsOnLine(float extra, WhitespaceTreatment whitespaceTreatment) const
{
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/text/sub-pixel/button-span-wrap-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698