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

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

Issue 1647313003: Continue converting to explicit LayoutUnit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicitContstructors
Patch Set: Add TODO Created 4 years, 11 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
Index: third_party/WebKit/Source/core/layout/line/RootInlineBox.h
diff --git a/third_party/WebKit/Source/core/layout/line/RootInlineBox.h b/third_party/WebKit/Source/core/layout/line/RootInlineBox.h
index b1c0554695ba190bd3cc00a294ef074e801f1ccd..77a8982f0b2370d0519719aea047a999320ab3b0 100644
--- a/third_party/WebKit/Source/core/layout/line/RootInlineBox.h
+++ b/third_party/WebKit/Source/core/layout/line/RootInlineBox.h
@@ -61,10 +61,10 @@ public:
LayoutUnit selectionTop() const;
LayoutUnit selectionBottom() const;
- LayoutUnit selectionHeight() const { return max<LayoutUnit>(0, selectionBottom() - selectionTop()); }
+ LayoutUnit selectionHeight() const { return (selectionBottom() - selectionTop()).clampNegativeToZero(); }
LayoutUnit selectionTopAdjustedForPrecedingBlock() const;
- LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return max<LayoutUnit>(0, selectionBottom() - selectionTopAdjustedForPrecedingBlock()); }
+ LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return (selectionBottom() - selectionTopAdjustedForPrecedingBlock()).clampNegativeToZero(); }
LayoutUnit blockDirectionPointInLine() const;
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineWidth.h ('k') | third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698