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

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

Issue 2519263002: [layout-ng] Convert ng_block_layout_algorithm to yield to the coordinator (Closed)
Patch Set: sync to head Created 4 years 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_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 9c1e9b333878f7896954a1f132792f04b6fcbdaa..e90fcb570f90c887130992ce12755bd701d1cd9d 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
@@ -15,18 +15,24 @@ namespace blink {
struct MinAndMaxContentSizes;
class NGBlockNode;
class NGConstraintSpace;
-class NGFragmentBase;
class NGPhysicalFragmentBase;
enum NGLayoutStatus { kNotFinished, kChildAlgorithmRequired, kNewFragment };
+enum NGLayoutAlgorithmType {
+ kBlockLayoutAlgorithm,
+ kInlineLayoutAlgorithm,
+ kLegacyBlockLayoutAlgorithm,
+ kTextLayoutAlgorithm
+};
+
// Base class for all LayoutNG algorithms.
class CORE_EXPORT NGLayoutAlgorithm
: public GarbageCollectedFinalized<NGLayoutAlgorithm> {
WTF_MAKE_NONCOPYABLE(NGLayoutAlgorithm);
public:
- NGLayoutAlgorithm() {}
+ NGLayoutAlgorithm(NGLayoutAlgorithmType type) : type_(type) {}
virtual ~NGLayoutAlgorithm() {}
// Actual layout function. Lays out the children and descendents within the
@@ -39,7 +45,7 @@ class CORE_EXPORT NGLayoutAlgorithm
// be set with the NGBlockNode that needs to be layed out next.
// If it returns NewFragment, the NGPhysicalFragmentBase out parameter
// will contain the new fragment.
- virtual NGLayoutStatus Layout(NGFragmentBase*,
+ virtual NGLayoutStatus Layout(NGPhysicalFragmentBase*,
NGPhysicalFragmentBase**,
NGLayoutAlgorithm**) = 0;
@@ -58,6 +64,11 @@ class CORE_EXPORT NGLayoutAlgorithm
}
DEFINE_INLINE_VIRTUAL_TRACE() {}
+
+ NGLayoutAlgorithmType algorithmType() const { return type_; }
+
+ private:
+ NGLayoutAlgorithmType type_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698