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

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

Issue 2692403003: [LayoutNG] Make NGBlockLayoutAlgorithm accept a NGBlockNode. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d2962edc0d73796563384574b7fe9ea6cdbc18ac..74365e488fe43b3c00cdcd0adb8695e4f5125797 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
@@ -28,15 +28,11 @@ class NGPhysicalFragment;
class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
public:
// Default constructor.
- // @param layout_object The layout object associated with this block.
- // @param style Style reference of the block that is being laid out.
- // @param first_child Our first child; the algorithm will use its NextSibling
- // method to access all the children.
+ // @param node The input node to perform layout upon.
// @param space The constraint space which the algorithm should generate a
// fragment within.
- NGBlockLayoutAlgorithm(LayoutObject* layout_object,
- PassRefPtr<const ComputedStyle> style,
- NGLayoutInputNode* first_child,
+ // @param break_token The break token from which the layout should start.
+ NGBlockLayoutAlgorithm(NGBlockNode* node,
NGConstraintSpace* space,
NGBreakToken* break_token = nullptr);
@@ -122,11 +118,9 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
return *space_for_current_child_.get();
}
- const ComputedStyle& Style() const { return *style_; }
+ const ComputedStyle& Style() const { return node_->Style(); }
- RefPtr<const ComputedStyle> style_;
-
- Persistent<NGLayoutInputNode> first_child_;
+ Persistent<NGBlockNode> node_;
Persistent<NGConstraintSpace> constraint_space_;
// The break token from which we are currently resuming layout.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698