// Copyright 2017 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_LIST_UNPOSITIONED_LIST_MARKER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LIST_UNPOSITIONED_LIST_MARKER_H_ #include <optional> #include "base/dcheck_is_on.h" #include "base/memory/scoped_refptr.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/layout/geometry/box_strut.h" #include "third_party/blink/renderer/platform/fonts/font_baseline.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/heap/member.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" namespace blink { class BlockNode; class BoxFragmentBuilder; class ComputedStyle; class ConstraintSpace; class LayoutOutsideListMarker; class LayoutResult; class PhysicalFragment; // Represents an unpositioned list marker. // // A list item can have either block children or inline children. Because // BLockLayoutAlgorithm handles the former while InlineLayoutAlgorithm // handles the latter, list marker can appear in either algorithm. // // To handle these two cases consistently, when list markers appear in these // algorithm, they are set as "unpositioned", and are propagated to ancestors // through LayoutResult until they meet the corresponding list items. // // In order to adjust with the other content of LI, marker will be handled // after other children. // First, try to find the alignment-baseline for the marker. See // |ContentAlignmentBaseline()| for details. // If found, layout marker, compute the content adjusted offset and float // intuded offset. See |AddToBox()| for details. // If not, layout marker and deal with it in |AddToBoxWithoutLineBoxes()|. // // In addition, marker makes LI non self-collapsing. If the BFC block-offset of // LI isn't resolved after layout marker, we'll resolve it. See // |BlockLayoutAlgorithm::PositionOrPropagateListMarker()| and // |BlockLayoutAlgorithm::PositionListMarkerWithoutLineBoxes()| for details. class CORE_EXPORT UnpositionedListMarker final { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LIST_UNPOSITIONED_LIST_MARKER_H_