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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h

Issue 2676533003: [LayoutNG] Convert physical fragments to being RefCounted. (Closed)
Patch Set: address comments. 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/core/layout/ng/ng_block_layout_algorithm.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
index f3d104037a26411a5a8b11b4c076d49ab2c74e48..331feb7139f0f90f91bd95f30156a9838df7be34 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
@@ -7,9 +7,9 @@
#include "core/CoreExport.h"
#include "core/layout/ng/ng_block_node.h"
-#include "core/layout/ng/ng_box_fragment.h"
#include "core/layout/ng/ng_break_token.h"
#include "core/layout/ng/ng_column_mapper.h"
+#include "core/layout/ng/ng_fragment_builder.h"
#include "core/layout/ng/ng_layout_algorithm.h"
#include "core/layout/ng/ng_units.h"
#include "wtf/RefPtr.h"
@@ -18,10 +18,9 @@ namespace blink {
class ComputedStyle;
class NGBlockBreakToken;
+class NGBoxFragment;
class NGConstraintSpace;
class NGConstraintSpaceBuilder;
-class NGFragment;
-class NGFragmentBuilder;
class NGPhysicalFragment;
// A class for general block layout (e.g. a <div> with no special style).
@@ -42,7 +41,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
NGBreakToken* break_token = nullptr);
bool ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*) const override;
- NGPhysicalFragment* Layout() override;
+ RefPtr<NGPhysicalFragment> Layout() override;
private:
NGBoxStrut CalculateMargins(const NGConstraintSpace& space,
@@ -50,7 +49,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
// Creates a new constraint space for the current child.
NGConstraintSpace* CreateConstraintSpaceForCurrentChild();
- void FinishCurrentChildLayout(NGFragment* fragment);
+ void FinishCurrentChildLayout(RefPtr<NGPhysicalBoxFragment>);
// Proceed to the next sibling that still needs layout.
//
@@ -127,7 +126,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
// The break token from which we are currently resuming layout.
Persistent<NGBreakToken> break_token_;
- Persistent<NGFragmentBuilder> builder_;
+ std::unique_ptr<NGFragmentBuilder> builder_;
Persistent<NGConstraintSpaceBuilder> space_builder_;
Persistent<NGConstraintSpace> space_for_current_child_;
Persistent<NGBlockNode> current_child_;

Powered by Google App Engine
This is Rietveld 408576698