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

Unified Diff: third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp

Issue 2724133003: [LayoutNG] Switch NGConstraintSpace to being RefCounted. (Closed)
Patch Set: moar. Created 3 years, 10 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/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 8e6a9c346a822b3d0353ae22ef0368ae51c2be92..09328bf137ee3b096ca8d3e895c403f6eebb326f 100644
--- a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
+++ b/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
@@ -20,7 +20,8 @@ namespace blink {
class NGInlineLayoutTest : public SimTest {
public:
- NGConstraintSpace* constraintSpaceForElement(LayoutNGBlockFlow* blockFlow) {
+ RefPtr<NGConstraintSpace> constraintSpaceForElement(
+ LayoutNGBlockFlow* blockFlow) {
return NGConstraintSpaceBuilder(
FromPlatformWritingMode(blockFlow->style()->getWritingMode()))
.SetAvailableSize(NGLogicalSize(LayoutUnit(), LayoutUnit()))
@@ -45,11 +46,12 @@ TEST_F(NGInlineLayoutTest, BlockWithSingleTextNode) {
Element* target = document().getElementById("target");
LayoutNGBlockFlow* blockFlow = toLayoutNGBlockFlow(target->layoutObject());
- NGConstraintSpace* constraintSpace = constraintSpaceForElement(blockFlow);
+ RefPtr<NGConstraintSpace> constraintSpace =
+ constraintSpaceForElement(blockFlow);
NGBlockNode* node = new NGBlockNode(blockFlow);
RefPtr<NGLayoutResult> result =
- NGBlockLayoutAlgorithm(node, constraintSpace).Layout();
+ NGBlockLayoutAlgorithm(node, constraintSpace.get()).Layout();
EXPECT_TRUE(result);
String expectedText("Hello World!");
@@ -69,11 +71,12 @@ TEST_F(NGInlineLayoutTest, BlockWithTextAndAtomicInline) {
Element* target = document().getElementById("target");
LayoutNGBlockFlow* blockFlow = toLayoutNGBlockFlow(target->layoutObject());
- NGConstraintSpace* constraintSpace = constraintSpaceForElement(blockFlow);
+ RefPtr<NGConstraintSpace> constraintSpace =
+ constraintSpaceForElement(blockFlow);
NGBlockNode* node = new NGBlockNode(blockFlow);
RefPtr<NGLayoutResult> result =
- NGBlockLayoutAlgorithm(node, constraintSpace).Layout();
+ NGBlockLayoutAlgorithm(node, constraintSpace.get()).Layout();
EXPECT_TRUE(result);
String expectedText("Hello ");

Powered by Google App Engine
This is Rietveld 408576698