|
Add platform/geometry pretty printers for logging and testing
This patch switches from a test-only GeometryPrinters and debug-only
toString() to a common pretty printer format for logging and testing.
For example, to print the value of a LayoutRect:
LayoutRect overflowRect(1, 2, 3, 4);
LOG(INFO) << "overflow: " << overflowRect.toString();
Which prints:
overflow: "1,2 3x4"
In tests, gtests will automatically call the PrintTo functions. In
debuggers, toString() should work as expected.
Minor changes:
1) Switched floating point precision to use "%lg" which prints up to
6 significant figures, and fewer if the value is an integer.
2) Added special-cases to catch LayoutUnit's min/max/nearly{Min,Max}.
BUG= 632096
Committed: https://crrev.com/bdceea3ea3872c9188c48c0a6e71d9a52ff92feb
Cr-Commit-Position: refs/heads/master@{#413347}
Total comments: 1
Total comments: 2
Total comments: 9
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+199 lines, -228 lines) |
Patch |
 |
M |
third_party/WebKit/Source/platform/LayoutUnit.h
|
View
|
1
2
3
4
5
|
4 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/Source/platform/LayoutUnit.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+24 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/blink_platform.gypi
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatBox.h
|
View
|
1
2
3
|
3 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
A + |
third_party/WebKit/Source/platform/geometry/FloatBox.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatBoxTest.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatPoint.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatPoint.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatPoint3D.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatPoint3D.cpp
|
View
|
1
2
3
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatQuad.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatQuad.cpp
|
View
|
1
2
3
|
2 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
 |
A + |
third_party/WebKit/Source/platform/geometry/FloatQuadTest.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+8 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatRect.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatRect.cpp
|
View
|
1
2
3
|
2 chunks |
+7 lines, -12 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatRectTest.cpp
|
View
|
1
2
3
|
1 chunk |
+12 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatRoundedRect.h
|
View
|
1
2
3
|
3 chunks |
+3 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatRoundedRect.cpp
|
View
|
1
2
3
|
3 chunks |
+14 lines, -21 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatRoundedRectTest.cpp
|
View
|
1
2
3
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatSize.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/FloatSize.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/IntPoint.h
|
View
|
1
2
3
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/IntPoint.cpp
|
View
|
1
2
3
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/IntRect.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/IntRect.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/IntRectTest.cpp
|
View
|
1
2
3
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/IntSize.h
|
View
|
1
2
3
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/IntSize.cpp
|
View
|
1
2
3
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/LayoutPoint.h
|
View
|
1
2
3
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/LayoutPoint.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/LayoutRect.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/LayoutRect.cpp
|
View
|
1
2
3
|
2 chunks |
+7 lines, -15 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/LayoutRectTest.cpp
|
View
|
1
2
3
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/LayoutSize.h
|
View
|
1
2
3
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/geometry/LayoutSize.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
D |
third_party/WebKit/Source/platform/testing/GeometryPrinters.h
|
View
|
1
2
3
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
D |
third_party/WebKit/Source/platform/testing/GeometryPrinters.cpp
|
View
|
1
2
3
|
1 chunk |
+35 lines, -82 lines |
0 comments
|
Download
|
Total messages: 59 (31 generated)
|