#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "base/ranges/algorithm.h"
#include "third_party/blink/renderer/core/dom/document_lifecycle.h"
#include "third_party/blink/renderer/core/html/shadow/shadow_element_utils.h"
#include "third_party/blink/renderer/core/layout/block_node.h"
#include "third_party/blink/renderer/core/layout/fragment_builder.h"
#include "third_party/blink/renderer/core/layout/geometry/box_strut.h"
#include "third_party/blink/renderer/core/layout/geometry/writing_mode_converter.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/inline/inline_node.h"
#include "third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.h"
#include "third_party/blink/renderer/core/layout/inline/ruby_utils.h"
#include "third_party/blink/renderer/core/layout/layout_block.h"
#include "third_party/blink/renderer/core/layout/layout_text_combine.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/layout/scrollable_overflow_calculator.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"
#include "third_party/blink/renderer/platform/wtf/size_assertions.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
namespace …
PhysicalFragment::PhysicalFragment(FragmentBuilder* builder,
WritingMode block_or_line_writing_mode,
FragmentType type,
unsigned sub_type)
: … { … }
PhysicalFragment::PhysicalFragment(const PhysicalFragment& other)
: … { … }
bool PhysicalFragment::IsBlockFlow() const { … }
bool PhysicalFragment::IsTextControlContainer() const { … }
bool PhysicalFragment::IsTextControlPlaceholder() const { … }
base::span<PhysicalOofPositionedNode>
PhysicalFragment::OutOfFlowPositionedDescendants() const { … }
const FragmentedOofData* PhysicalFragment::GetFragmentedOofData() const { … }
bool PhysicalFragment::HasNestedMulticolsWithOOFs() const { … }
bool PhysicalFragment::NeedsOOFPositionedInfoPropagation() const { … }
PhysicalFragment::OofData* PhysicalFragment::OofDataFromBuilder(
FragmentBuilder* builder) { … }
PhysicalFragment::OofData* PhysicalFragment::FragmentedOofDataFromBuilder(
FragmentBuilder* builder) { … }
void PhysicalFragment::ClearOofData() { … }
PhysicalFragment::OofData* PhysicalFragment::CloneOofData() const { … }
bool PhysicalFragment::IsMonolithic() const { … }
bool PhysicalFragment::IsImplicitAnchor() const { … }
const FragmentData* PhysicalFragment::GetFragmentData() const { … }
const PhysicalFragment* PhysicalFragment::PostLayout() const { … }
#if DCHECK_IS_ON()
void PhysicalFragment::CheckType() const { … }
#endif
LogicalRect PhysicalFragment::ConvertChildToLogical(
const PhysicalRect& physical_rect) const { … }
String PhysicalFragment::ToString() const { … }
String PhysicalFragment::DumpFragmentTree(
DumpFlags flags,
const PhysicalFragment* target,
std::optional<PhysicalOffset> fragment_offset,
unsigned indent) const { … }
String PhysicalFragment::DumpFragmentTree(const LayoutObject& root,
DumpFlags flags,
const PhysicalFragment* target) { … }
void PhysicalFragment::Trace(Visitor* visitor) const { … }
void PhysicalFragment::TraceAfterDispatch(Visitor* visitor) const { … }
base::span<const PhysicalFragmentLink> PhysicalFragment::Children() const { … }
PhysicalFragment::PostLayoutChildLinkList PhysicalFragment::PostLayoutChildren()
const { … }
void PhysicalFragment::SetChildrenInvalid() const { … }
void PhysicalFragment::AddOutlineRectsForNormalChildren(
OutlineRectCollector& collector,
const PhysicalOffset& additional_offset,
OutlineType outline_type,
const LayoutBoxModelObject* containing_block) const { … }
void PhysicalFragment::AddOutlineRectsForCursor(
OutlineRectCollector& collector,
const PhysicalOffset& additional_offset,
OutlineType outline_type,
const LayoutBoxModelObject* containing_block,
InlineCursor* cursor) const { … }
void PhysicalFragment::AddOutlineRectsForDescendant(
const PhysicalFragmentLink& descendant,
OutlineRectCollector& collector,
const PhysicalOffset& additional_offset,
OutlineType outline_type,
const LayoutBoxModelObject* containing_block) const { … }
bool PhysicalFragment::DependsOnPercentageBlockSize(
const FragmentBuilder& builder) { … }
void PhysicalFragment::OofData::Trace(Visitor* visitor) const { … }
std::ostream& operator<<(std::ostream& out, const PhysicalFragment& fragment) { … }
std::ostream& operator<<(std::ostream& out, const PhysicalFragment* fragment) { … }
}
#if DCHECK_IS_ON()
void ShowFragmentTree(const blink::PhysicalFragment* fragment) { … }
void ShowFragmentTree(const blink::LayoutObject& root,
const blink::PhysicalFragment* target) { … }
void ShowEntireFragmentTree(const blink::LayoutObject& target) { … }
void ShowEntireFragmentTree(const blink::PhysicalFragment* target) { … }
#endif