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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_node.cc

Issue 2714803002: [LayoutNG] Allow block-flow layout to be fragmented using new approach. (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_node.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
index 67a33262b55619d52b3d2e87240cd676a431d969..24eba1f84a15591d62213ad1b55df2e15e8c3028 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
@@ -86,8 +86,8 @@ NGBlockNode::NGBlockNode(ComputedStyle* style)
// included from a compilation unit that lacks the ComputedStyle definition.
NGBlockNode::~NGBlockNode() {}
-RefPtr<NGLayoutResult> NGBlockNode::Layout(
- NGConstraintSpace* constraint_space) {
+RefPtr<NGLayoutResult> NGBlockNode::Layout(NGConstraintSpace* constraint_space,
+ NGBreakToken* break_token) {
// Use the old layout code and synthesize a fragment.
if (!CanUseNewLayout()) {
DCHECK(layout_box_);
@@ -95,9 +95,9 @@ RefPtr<NGLayoutResult> NGBlockNode::Layout(
return layout_result_;
}
- layout_result_ =
- NGBlockLayoutAlgorithm(this, constraint_space, CurrentBreakToken())
- .Layout();
+ layout_result_ = NGBlockLayoutAlgorithm(this, constraint_space,
+ toNGBlockBreakToken(break_token))
+ .Layout();
CopyFragmentDataToLayoutBox(*constraint_space);
return layout_result_;
@@ -207,11 +207,6 @@ void NGBlockNode::SetFirstChild(NGLayoutInputNode* child) {
first_child_ = child;
}
-NGBreakToken* NGBlockNode::CurrentBreakToken() const {
- return layout_result_ ? layout_result_->PhysicalFragment()->BreakToken()
- : nullptr;
-}
-
DEFINE_TRACE(NGBlockNode) {
visitor->trace(next_sibling_);
visitor->trace(first_child_);

Powered by Google App Engine
This is Rietveld 408576698