Index: third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp b/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp |
index 2cbd0f5f4a3d0c226d34b9c2c07d863a41e84235..a0cac20d54c894818603370c2274511aa3d441d3 100644 |
--- a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp |
@@ -21,15 +21,12 @@ namespace blink { |
class NGInlineLayoutTest : public SimTest { |
public: |
NGConstraintSpace* constraintSpaceForElement(LayoutNGBlockFlow* blockFlow) { |
- NGConstraintSpaceBuilder builder( |
- FromPlatformWritingMode(blockFlow->style()->getWritingMode())); |
- builder.SetAvailableSize(NGLogicalSize(LayoutUnit(), LayoutUnit())); |
- builder.SetPercentageResolutionSize( |
- NGLogicalSize(LayoutUnit(), LayoutUnit())); |
- NGConstraintSpace* constraintSpace = new NGConstraintSpace( |
- FromPlatformWritingMode(blockFlow->style()->getWritingMode()), |
- blockFlow->style()->direction(), builder.ToConstraintSpace()); |
- return constraintSpace; |
+ return NGConstraintSpaceBuilder( |
+ FromPlatformWritingMode(blockFlow->style()->getWritingMode())) |
+ .SetAvailableSize(NGLogicalSize(LayoutUnit(), LayoutUnit())) |
+ .SetPercentageResolutionSize(NGLogicalSize(LayoutUnit(), LayoutUnit())) |
+ .SetTextDirection(blockFlow->style()->direction()) |
+ .ToConstraintSpace(); |
} |
}; |