#include "third_party/blink/renderer/core/layout/layout_multi_column_flow_thread.h"
#include "base/not_fatal_until.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/layout/fragmentation_utils.h"
#include "third_party/blink/renderer/core/layout/geometry/writing_mode_converter.h"
#include "third_party/blink/renderer/core/layout/layout_multi_column_set.h"
#include "third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/multi_column_fragmentainer_group.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
namespace blink {
#if DCHECK_IS_ON()
const LayoutBoxModelObject* LayoutMultiColumnFlowThread::style_changed_object_;
#endif
bool LayoutMultiColumnFlowThread::could_contain_spanners_;
bool LayoutMultiColumnFlowThread::toggle_spanners_if_needed_;
LayoutMultiColumnFlowThread::LayoutMultiColumnFlowThread()
: … { … }
LayoutMultiColumnFlowThread::~LayoutMultiColumnFlowThread() = default;
void LayoutMultiColumnFlowThread::Trace(Visitor* visitor) const { … }
LayoutMultiColumnFlowThread* LayoutMultiColumnFlowThread::CreateAnonymous(
Document& document,
const ComputedStyle& parent_style) { … }
LayoutMultiColumnSet* LayoutMultiColumnFlowThread::FirstMultiColumnSet() const { … }
LayoutMultiColumnSet* LayoutMultiColumnFlowThread::LastMultiColumnSet() const { … }
static inline bool IsMultiColumnContainer(const LayoutObject& object) { … }
bool LayoutMultiColumnFlowThread::CanContainSpannerInParentFragmentationContext(
const LayoutObject& object) const { … }
static inline bool HasAnyColumnSpanners(
const LayoutMultiColumnFlowThread& flow_thread) { … }
static LayoutObject* NextInPreOrderAfterChildrenSkippingOutOfFlow(
LayoutMultiColumnFlowThread* flow_thread,
LayoutObject* descendant) { … }
static LayoutObject* PreviousInPreOrderSkippingOutOfFlow(
LayoutMultiColumnFlowThread* flow_thread,
LayoutObject* descendant) { … }
static LayoutObject* FirstLayoutObjectInSet(
LayoutMultiColumnSet* multicol_set) { … }
static LayoutObject* LastLayoutObjectInSet(LayoutMultiColumnSet* multicol_set) { … }
LayoutMultiColumnSet* LayoutMultiColumnFlowThread::MapDescendantToColumnSet(
LayoutObject* layout_object) const { … }
LayoutMultiColumnSpannerPlaceholder*
LayoutMultiColumnFlowThread::ContainingColumnSpannerPlaceholder(
const LayoutObject* descendant) const { … }
void LayoutMultiColumnFlowThread::Populate() { … }
void LayoutMultiColumnFlowThread::EvacuateAndDestroy() { … }
PhysicalOffset LayoutMultiColumnFlowThread::ColumnOffset(
const PhysicalOffset& point) const { … }
bool LayoutMultiColumnFlowThread::IsPageLogicalHeightKnown() const { … }
PhysicalOffset LayoutMultiColumnFlowThread::FlowThreadTranslationAtOffset(
LayoutUnit offset_in_flow_thread,
PageBoundaryRule rule) const { … }
PhysicalOffset LayoutMultiColumnFlowThread::FlowThreadTranslationAtPoint(
const PhysicalOffset& flow_thread_point) const { … }
PhysicalOffset LayoutMultiColumnFlowThread::VisualPointToFlowThreadPoint(
const PhysicalOffset& visual_point) const { … }
LayoutMultiColumnSet* LayoutMultiColumnFlowThread::ColumnSetAtBlockOffset(
LayoutUnit offset,
PageBoundaryRule page_boundary_rule) const { … }
void LayoutMultiColumnFlowThread::ColumnRuleStyleDidChange() { … }
bool LayoutMultiColumnFlowThread::RemoveSpannerPlaceholderIfNoLongerValid(
LayoutBox* spanner_object_in_flow_thread) { … }
LayoutMultiColumnFlowThread* LayoutMultiColumnFlowThread::EnclosingFlowThread(
AncestorSearchConstraint constraint) const { … }
void LayoutMultiColumnFlowThread::SetColumnCountFromNG(unsigned column_count) { … }
void LayoutMultiColumnFlowThread::FinishLayoutFromNG(
LayoutUnit flow_thread_offset) { … }
void LayoutMultiColumnFlowThread::CreateAndInsertMultiColumnSet(
LayoutBox* insert_before) { … }
void LayoutMultiColumnFlowThread::CreateAndInsertSpannerPlaceholder(
LayoutBox* spanner_object_in_flow_thread,
LayoutObject* inserted_before_in_flow_thread) { … }
void LayoutMultiColumnFlowThread::DestroySpannerPlaceholder(
LayoutMultiColumnSpannerPlaceholder* placeholder) { … }
bool LayoutMultiColumnFlowThread::DescendantIsValidColumnSpanner(
LayoutObject* descendant) const { … }
void LayoutMultiColumnFlowThread::AddColumnSetToThread(
LayoutMultiColumnSet* column_set) { … }
void LayoutMultiColumnFlowThread::WillBeRemovedFromTree() { … }
static bool ShouldSkipInsertedOrRemovedChild(
LayoutMultiColumnFlowThread* flow_thread,
const LayoutObject& child) { … }
void LayoutMultiColumnFlowThread::FlowThreadDescendantWasInserted(
LayoutObject* descendant) { … }
void LayoutMultiColumnFlowThread::FlowThreadDescendantWillBeRemoved(
LayoutObject* descendant) { … }
static inline bool NeedsToReinsertIntoFlowThread(
const LayoutBoxModelObject& object,
const ComputedStyle& old_style,
const ComputedStyle& new_style) { … }
static inline bool NeedsToRemoveFromFlowThread(
const LayoutBoxModelObject& object,
const ComputedStyle& old_style,
const ComputedStyle& new_style) { … }
static inline bool NeedsToInsertIntoFlowThread(
const LayoutMultiColumnFlowThread* flow_thread,
const LayoutBoxModelObject* descendant,
const ComputedStyle& old_style,
const ComputedStyle& new_style) { … }
void LayoutMultiColumnFlowThread::FlowThreadDescendantStyleWillChange(
LayoutBoxModelObject* descendant,
StyleDifference diff,
const ComputedStyle& new_style) { … }
void LayoutMultiColumnFlowThread::FlowThreadDescendantStyleDidChange(
LayoutBoxModelObject* descendant,
StyleDifference diff,
const ComputedStyle& old_style) { … }
void LayoutMultiColumnFlowThread::ToggleSpannersInSubtree(
LayoutBoxModelObject* descendant) { … }
LayoutPoint LayoutMultiColumnFlowThread::LocationInternal() const { … }
PhysicalSize LayoutMultiColumnFlowThread::Size() const { … }
void LayoutMultiColumnFlowThread::UpdateGeometry() { … }
}