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

Unified Diff: third_party/WebKit/Source/platform/LayoutUnit.h

Issue 2191233002: Add platform/geometry pretty printers for logging and testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust tests to work around uninteresting cross-platform differences Created 4 years, 5 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/platform/LayoutUnit.h
diff --git a/third_party/WebKit/Source/platform/LayoutUnit.h b/third_party/WebKit/Source/platform/LayoutUnit.h
index 16677770cb0f7be5762cf5721fd9ef0027c4a294..f3ee505b5d867fcf8f963b4553a228f68f4c7b9c 100644
--- a/third_party/WebKit/Source/platform/LayoutUnit.h
+++ b/third_party/WebKit/Source/platform/LayoutUnit.h
@@ -808,6 +808,14 @@ inline LayoutUnit clampToLayoutUnit(LayoutUnit value, LayoutUnit min, LayoutUnit
inline std::ostream& operator<<(std::ostream& stream, const LayoutUnit& value)
{
+ if (value == LayoutUnit::max())
+ return stream << "LayoutUnit::max(" << value.toDouble() << ")";
+ if (value == LayoutUnit::min())
+ return stream << "LayoutUnit::min(" << value.toDouble() << ")";
+ if (value == LayoutUnit::nearlyMax())
+ return stream << "LayoutUnit::nearlyMax(" << value.toDouble() << ")";
+ if (value == LayoutUnit::nearlyMin())
+ return stream << "LayoutUnit::nearlyMin(" << value.toDouble() << ")";
return stream << value.toDouble();
}

Powered by Google App Engine
This is Rietveld 408576698