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

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

Issue 2810833003: Move container_builder to NGLayoutAlgorithm base class. (Closed)
Patch Set: git rebase-update Created 3 years, 8 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 | « third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc ('k') | no next file » | 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_layout_algorithm.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h
index d70e24449783eab0950b9d24c466bd70e49da414..231750602f6c817490ecca332435c35b1ba478d3 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h
@@ -6,6 +6,7 @@
#define NGLayoutAlgorithm_h
#include "core/CoreExport.h"
+#include "core/layout/ng/ng_fragment_builder.h"
#include "core/layout/ng/ng_min_max_content_size.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Optional.h"
@@ -24,7 +25,10 @@ class CORE_EXPORT NGLayoutAlgorithm {
NGLayoutAlgorithm(NGInputNodeType* node,
NGConstraintSpace* space,
NGBreakTokenType* break_token)
- : node_(node), constraint_space_(space), break_token_(break_token) {}
+ : node_(node),
+ constraint_space_(space),
+ break_token_(break_token),
+ container_builder_(NGPhysicalFragment::kFragmentBox, node) {}
virtual ~NGLayoutAlgorithm() {}
@@ -55,6 +59,11 @@ class CORE_EXPORT NGLayoutAlgorithm {
return node_->Style();
}
+ NGLogicalOffset ContainerBfcOffset() const {
+ DCHECK(container_builder_.BfcOffset().has_value());
+ return container_builder_.BfcOffset().value();
+ }
+
virtual NGInputNodeType* Node() const { return node_; }
NGBreakTokenType* BreakToken() const { return break_token_; }
@@ -64,6 +73,8 @@ class CORE_EXPORT NGLayoutAlgorithm {
// The break token from which we are currently resuming layout.
NGBreakTokenType* break_token_;
+
+ NGFragmentBuilder container_builder_;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698