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

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

Issue 2668183003: [LayoutNG] Make NG algorithms non-oilpan. (Closed)
Patch Set: fix win compile 2? 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_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 59df65efdc85e4e3aa9cf60718217502645790e8..b3fc83679e9c274524b446173f6a848854313796 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,32 +6,19 @@
#define NGLayoutAlgorithm_h
#include "core/CoreExport.h"
-#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
namespace blink {
struct MinAndMaxContentSizes;
-class NGConstraintSpace;
class NGPhysicalFragment;
-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);
+class CORE_EXPORT NGLayoutAlgorithm {
+ STACK_ALLOCATED();
public:
- NGLayoutAlgorithm(NGLayoutAlgorithmType type) : type_(type) {}
virtual ~NGLayoutAlgorithm() {}
// Actual layout function. Lays out the children and descendents within the
@@ -40,8 +27,6 @@ class CORE_EXPORT NGLayoutAlgorithm
// TODO(layout-dev): attempt to make this function const.
virtual NGPhysicalFragment* Layout() = 0;
- enum MinAndMaxState { kSuccess, kPending, kNotImplemented };
-
// Computes the min-content and max-content intrinsic sizes for the given box.
// The result will not take any min-width, max-width or width properties into
// account. Implementations can return false, in which case the caller is
@@ -51,13 +36,6 @@ class CORE_EXPORT NGLayoutAlgorithm
virtual bool ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*) const {
return false;
}
-
- DEFINE_INLINE_VIRTUAL_TRACE() {}
-
- NGLayoutAlgorithmType algorithmType() const { return type_; }
-
- private:
- NGLayoutAlgorithmType type_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698