// Copyright 2023 The Chromium Authors // 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_PHYSICAL_FRAGMENT_RARE_DATA_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_PHYSICAL_FRAGMENT_RARE_DATA_H_ #include <climits> #include "third_party/blink/renderer/core/layout/geometry/logical_rect.h" #include "third_party/blink/renderer/core/layout/table/table_fragment_data.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" namespace blink { class BoxFragmentBuilder; class TableBorders; struct FrameSetLayoutData; struct MathMLPaintInfo; // This class manages rare data of PhysicalBoxFragment. // Only PhysicalBoxFragment should use this class. // // How to add a new field: // * Add a new enum member to FieldId. // If the new one has the maximum value, update kMaxValue too. // * Add a new union member of RareField. // The size of a member should be smaller than or same as LayoutUnit[4]. // If it's larger, it should be pointed by a pointer such as // std::unique_ptr<>. // // * Add field initialization code to two PhysicalFragmentRareData constructors // * Update DISPATCH_BY_MEMBER_TYPE macro. class PhysicalFragmentRareData : public GarbageCollected<PhysicalFragmentRareData> { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_PHYSICAL_FRAGMENT_RARE_DATA_H_