blob: 37fafae2b95d58cb21d437819f27698b0a3b8e7f [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_LAYOUT_NG_BLOCK_FLOW_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_LAYOUT_NG_BLOCK_FLOW_H_
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.h"
namespace blink {
// This overrides the default layout block algorithm to use Layout NG.
class CORE_EXPORT LayoutNGBlockFlow
: public LayoutNGBlockFlowMixin<LayoutBlockFlow> {
public:
explicit LayoutNGBlockFlow(Element*);
~LayoutNGBlockFlow() override;
void UpdateBlockLayout(bool relayout_children) override;
const char* GetName() const override { return "LayoutNGBlockFlow"; }
protected:
bool IsOfType(LayoutObjectType) const override;
private:
void UpdateMargins(const NGConstraintSpace&);
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutNGBlockFlow, IsLayoutNGBlockFlow());
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_LAYOUT_NG_BLOCK_FLOW_H_