chromium/third_party/blink/renderer/core/layout/anchor_query_map.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/layout/anchor_query_map.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/logical_fragment_link.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"

namespace blink {

namespace {

// Represents a fragmentainer. This is in the logical coordinate system
// because the size of the fragmentation context may not have determined yet.
// In that case, physical coordinates can't be computed yet.
struct FragmentainerContext {};

// This struct is a variation of |AnchorReference|, using the stitched
// coordinate system for the block-fragmented out-of-flow positioned objects.
struct StitchedAnchorReference
    : public GarbageCollected<StitchedAnchorReference> {};

// This creates anchor queries in the stitched coordinate system. The result
// can be converted to a |LogicalAnchorQuery|.
struct StitchedAnchorQuery : public GarbageCollected<StitchedAnchorQuery>,
                             public AnchorQueryBase<StitchedAnchorReference> {};

// This collects |StitchedAnchorQuery| for each containing block.
struct StitchedAnchorQueries {};

}  // namespace

LogicalAnchorQueryMap::LogicalAnchorQueryMap(
    const LayoutBox& root_box,
    const LogicalFragmentLinkVector& children,
    WritingDirectionMode writing_direction)
    :{}

void LogicalAnchorQueryMap::SetChildren(
    const LogicalFragmentLinkVector& children) {}

const LogicalAnchorQuery& LogicalAnchorQueryMap::AnchorQuery(
    const LayoutObject& containing_block) const {}

// Update |queries_| for the given |layout_object| and its ancestors. This is
// `const`, modifies `mutable` caches only, so that other `const` functions such
// as |AnchorQuery| can call.
void LogicalAnchorQueryMap::Update(const LayoutObject& layout_object) const {}

}  // namespace blink