summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/layout/ng/ng_block_node.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/ng/ng_block_node.h')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/ng/ng_block_node.h42
1 files changed, 23 insertions, 19 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/ng/ng_block_node.h b/chromium/third_party/blink/renderer/core/layout/ng/ng_block_node.h
index 9befdc8f5e0..87891e8467f 100644
--- a/chromium/third_party/blink/renderer/core/layout/ng/ng_block_node.h
+++ b/chromium/third_party/blink/renderer/core/layout/ng/ng_block_node.h
@@ -37,7 +37,7 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
scoped_refptr<const NGLayoutResult> Layout(
const NGConstraintSpace& constraint_space,
const NGBlockBreakToken* break_token = nullptr,
- const NGEarlyBreak* = nullptr);
+ const NGEarlyBreak* = nullptr) const;
// This method is just for use within the |NGSimplifiedLayoutAlgorithm|.
//
@@ -45,7 +45,7 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
// space used to generate the |NGLayoutResult|.
// Otherwise it will simply return the previous layout result generated.
scoped_refptr<const NGLayoutResult> SimplifiedLayout(
- const NGPhysicalFragment& previous_fragment);
+ const NGPhysicalFragment& previous_fragment) const;
// This method is just for use within the |NGOutOfFlowLayoutPart|.
//
@@ -82,9 +82,10 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
// The constraint space is also used to perform layout when this block's
// writing mode is orthogonal to its parent's, in which case the constraint
// space is not optional.
- MinMaxSizesResult ComputeMinMaxSizes(WritingMode container_writing_mode,
- const MinMaxSizesInput&,
- const NGConstraintSpace* = nullptr);
+ MinMaxSizesResult ComputeMinMaxSizes(
+ WritingMode container_writing_mode,
+ const MinMaxSizesInput&,
+ const NGConstraintSpace* = nullptr) const;
MinMaxSizes ComputeMinMaxSizesFromLegacy(const MinMaxSizesInput&) const;
@@ -152,7 +153,7 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
// LayoutObject-less, but we still need to keep the fragments generated
// somewhere.
void AddColumnResult(scoped_refptr<const NGLayoutResult>,
- const NGBlockBreakToken* incoming_break_token);
+ const NGBlockBreakToken* incoming_break_token) const;
static bool CanUseNewLayout(const LayoutBox&);
bool CanUseNewLayout() const;
@@ -160,11 +161,12 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
String ToString() const;
private:
- void PrepareForLayout();
+ void PrepareForLayout() const;
// Runs layout on the underlying LayoutObject and creates a fragment for the
// resulting geometry.
- scoped_refptr<const NGLayoutResult> RunLegacyLayout(const NGConstraintSpace&);
+ scoped_refptr<const NGLayoutResult> RunLegacyLayout(
+ const NGConstraintSpace&) const;
scoped_refptr<const NGLayoutResult> RunSimplifiedLayout(
const NGLayoutAlgorithmParams&,
@@ -175,37 +177,39 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
void FinishLayout(LayoutBlockFlow*,
const NGConstraintSpace&,
const NGBlockBreakToken*,
- scoped_refptr<const NGLayoutResult>);
+ scoped_refptr<const NGLayoutResult>) const;
// After we run the layout algorithm, this function copies back the geometry
// data to the layout box.
void CopyFragmentDataToLayoutBox(
const NGConstraintSpace&,
const NGLayoutResult&,
- const NGBlockBreakToken* previous_break_token);
+ const NGBlockBreakToken* previous_break_token) const;
void CopyFragmentItemsToLayoutBox(const NGPhysicalBoxFragment& container,
- const NGFragmentItems& items);
+ const NGFragmentItems& items) const;
void CopyFragmentDataToLayoutBoxForInlineChildren(
const NGPhysicalContainerFragment& container,
LayoutUnit initial_container_width,
bool initial_container_is_flipped,
- PhysicalOffset offset = {});
- void PlaceChildrenInLayoutBox(const NGPhysicalBoxFragment&,
- const NGBlockBreakToken* previous_break_token);
- void PlaceChildrenInFlowThread(const NGPhysicalBoxFragment&);
+ PhysicalOffset offset = {}) const;
+ void PlaceChildrenInLayoutBox(
+ const NGPhysicalBoxFragment&,
+ const NGBlockBreakToken* previous_break_token) const;
+ void PlaceChildrenInFlowThread(const NGPhysicalBoxFragment&) const;
void CopyChildFragmentPosition(
const NGPhysicalBoxFragment& child_fragment,
PhysicalOffset,
const NGPhysicalBoxFragment& container_fragment,
- const NGBlockBreakToken* previous_container_break_token = nullptr);
+ const NGBlockBreakToken* previous_container_break_token = nullptr) const;
void CopyBaselinesFromLegacyLayout(const NGConstraintSpace&,
- NGBoxFragmentBuilder*);
- LayoutUnit AtomicInlineBaselineFromLegacyLayout(const NGConstraintSpace&);
+ NGBoxFragmentBuilder*) const;
+ LayoutUnit AtomicInlineBaselineFromLegacyLayout(
+ const NGConstraintSpace&) const;
void UpdateShapeOutsideInfoIfNeeded(
const NGLayoutResult&,
- LayoutUnit percentage_resolution_inline_size);
+ LayoutUnit percentage_resolution_inline_size) const;
};
template <>