blob: 022dc9bf9cfac2b030895f0fdcd4dc24d896fb2e [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 NGPhysicalBoxFragment_h
#define NGPhysicalBoxFragment_h
#include "core/CoreExport.h"
#include "core/layout/ng/inline/ng_baseline.h"
#include "core/layout/ng/ng_physical_container_fragment.h"
namespace blink {
class CORE_EXPORT NGPhysicalBoxFragment final
: public NGPhysicalContainerFragment {
public:
// This modifies the passed-in children vector.
NGPhysicalBoxFragment(LayoutObject* layout_object,
const ComputedStyle& style,
NGPhysicalSize size,
Vector<RefPtr<NGPhysicalFragment>>& children,
Vector<NGBaseline>& baselines,
unsigned, // NGBorderEdges::Physical
RefPtr<NGBreakToken> break_token = nullptr);
const NGBaseline* Baseline(const NGBaselineRequest&) const;
void UpdateVisualRect() const override;
RefPtr<NGPhysicalFragment> CloneWithoutOffset() const;
private:
Vector<NGBaseline> baselines_;
};
DEFINE_TYPE_CASTS(NGPhysicalBoxFragment,
NGPhysicalFragment,
fragment,
fragment->Type() == NGPhysicalFragment::kFragmentBox,
fragment.Type() == NGPhysicalFragment::kFragmentBox);
} // namespace blink
#endif // NGPhysicalBoxFragment_h