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

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

Issue 2632523002: [LayoutNG] Initial support for multicol, introducing NGBlockBreakToken. (Closed)
Patch Set: Created 3 years, 11 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.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_node.h b/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
index d2b9a3835e0bbb53fab395731e5f97d1974099b0..29ac63e34b3c6db1246ea0bf569a5fd6eea5d8c6 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
@@ -7,6 +7,7 @@
#include "core/CoreExport.h"
#include "core/layout/ng/ng_layout_input_node.h"
+#include "core/layout/ng/ng_physical_box_fragment.h"
#include "platform/heap/Handle.h"
namespace blink {
@@ -14,11 +15,11 @@ namespace blink {
class ComputedStyle;
class LayoutBox;
class LayoutObject;
+class NGBreakToken;
class NGConstraintSpace;
class NGFragment;
class NGLayoutAlgorithm;
class NGLayoutCoordinator;
-class NGPhysicalBoxFragment;
struct MinAndMaxContentSizes;
// Represents a node to be laid out.
@@ -55,6 +56,12 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
void SetNextSibling(NGBlockNode*);
void SetFirstChild(NGLayoutInputNode*);
+ void SetFragment(NGPhysicalBoxFragment* fragment) { fragment_ = fragment; }
+ NGBreakToken* CurrentBreakToken() const;
+ bool IsLayoutFinished() const {
+ return fragment_ && !fragment_->BreakToken();
+ }
+
DECLARE_VIRTUAL_TRACE();
// Runs layout on layout_box_ and creates a fragment for the resulting
@@ -89,6 +96,9 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
Member<NGLayoutInputNode> first_child_;
Member<NGLayoutCoordinator> layout_coordinator_;
Member<NGLayoutAlgorithm> minmax_algorithm_;
+ // TODO(mstensho): An input node may produce multiple fragments, so this
+ // should probably be renamed to last_fragment_ or something like that, since
+ // the last fragment is all we care about when resuming layout.
Member<NGPhysicalBoxFragment> fragment_;
};

Powered by Google App Engine
This is Rietveld 408576698