#include "third_party/blink/renderer/core/layout/layout_box_model_object.h"
#include "cc/input/main_thread_scrolling_reason.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/editing/ime/input_method_controller.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/html/html_body_element.h"
#include "third_party/blink/renderer/core/html/html_html_element.h"
#include "third_party/blink/renderer/core/layout/constraint_space.h"
#include "third_party/blink/renderer/core/layout/geometry/transform_state.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/layout_block.h"
#include "third_party/blink/renderer/core/layout/layout_flow_thread.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/layout/layout_object_inlines.h"
#include "third_party/blink/renderer/core/layout/layout_result.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/legacy_layout_tree_walking.h"
#include "third_party/blink/renderer/core/layout/svg/svg_resources.h"
#include "third_party/blink/renderer/core/layout/table/layout_table_section.h"
#include "third_party/blink/renderer/core/page/scrolling/sticky_position_scrolling_constraints.h"
#include "third_party/blink/renderer/core/paint/inline_paint_context.h"
#include "third_party/blink/renderer/core/paint/object_paint_invalidator.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/style/shadow_list.h"
#include "third_party/blink/renderer/platform/geometry/length_functions.h"
namespace blink {
namespace {
void MarkBoxForRelayoutAfterSplit(LayoutBoxModelObject* box) { … }
void CollapseLoneAnonymousBlockChild(LayoutBox* parent, LayoutObject* child) { … }
bool NeedsAnchorPositionScrollData(Element& element,
const ComputedStyle& style) { … }
}
LayoutBoxModelObject::LayoutBoxModelObject(ContainerNode* node)
: … { … }
LayoutBoxModelObject::~LayoutBoxModelObject() = default;
void LayoutBoxModelObject::WillBeDestroyed() { … }
void LayoutBoxModelObject::StyleWillChange(StyleDifference diff,
const ComputedStyle& new_style) { … }
DISABLE_CFI_PERF
void LayoutBoxModelObject::StyleDidChange(StyleDifference diff,
const ComputedStyle* old_style) { … }
void LayoutBoxModelObject::CreateLayerAfterStyleChange() { … }
void LayoutBoxModelObject::DestroyLayer() { … }
bool LayoutBoxModelObject::HasSelfPaintingLayer() const { … }
PaintLayerScrollableArea* LayoutBoxModelObject::GetScrollableArea() const { … }
void LayoutBoxModelObject::AddOutlineRectsForNormalChildren(
OutlineRectCollector& collector,
const PhysicalOffset& additional_offset,
OutlineType include_block_overflows) const { … }
void LayoutBoxModelObject::AddOutlineRectsForDescendant(
const LayoutObject& descendant,
OutlineRectCollector& collector,
const PhysicalOffset& additional_offset,
OutlineType include_block_overflows) const { … }
void LayoutBoxModelObject::RecalcVisualOverflow() { … }
bool LayoutBoxModelObject::ShouldBeHandledAsInline(
const ComputedStyle& style) const { … }
void LayoutBoxModelObject::UpdateFromStyle() { … }
void LayoutBoxModelObject::UpdateCanCompositeBackgroundAttachmentFixed(
bool enable_composited_background_attachment_fixed) { … }
PhysicalRect LayoutBoxModelObject::VisualOverflowRectIncludingFilters() const { … }
PhysicalRect LayoutBoxModelObject::ApplyFiltersToRect(
const PhysicalRect& rect) const { … }
LayoutBlock* LayoutBoxModelObject::StickyContainer() const { … }
StickyPositionScrollingConstraints*
LayoutBoxModelObject::ComputeStickyPositionConstraints() const { … }
PhysicalOffset LayoutBoxModelObject::StickyPositionOffset() const { … }
PhysicalOffset LayoutBoxModelObject::AdjustedPositionRelativeTo(
const PhysicalOffset& start_point,
const Element* offset_parent) const { … }
LayoutUnit LayoutBoxModelObject::OffsetLeft(const Element* parent) const { … }
LayoutUnit LayoutBoxModelObject::OffsetTop(const Element* parent) const { … }
LayoutUnit LayoutBoxModelObject::ComputedCSSPadding(
const Length& padding) const { … }
LayoutUnit LayoutBoxModelObject::ContainingBlockLogicalWidthForContent() const { … }
LogicalRect LayoutBoxModelObject::LocalCaretRectForEmptyElement(
LayoutUnit width,
LayoutUnit text_indent_offset) const { … }
void LayoutBoxModelObject::MoveChildTo(
LayoutBoxModelObject* to_box_model_object,
LayoutObject* child,
LayoutObject* before_child,
bool full_remove_insert) { … }
void LayoutBoxModelObject::MoveChildrenTo(
LayoutBoxModelObject* to_box_model_object,
LayoutObject* start_child,
LayoutObject* end_child,
LayoutObject* before_child,
bool full_remove_insert) { … }
LayoutObject* LayoutBoxModelObject::SplitAnonymousBoxesAroundChild(
LayoutObject* before_child) { … }
LayoutBox* LayoutBoxModelObject::CreateAnonymousBoxToSplit(
const LayoutBox* box_to_split) const { … }
bool LayoutBoxModelObject::BackgroundTransfersToView(
const ComputedStyle* document_element_style) const { … }
}