#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/style/position_area.h"
#include "base/check_op.h"
#include "third_party/blink/renderer/core/layout/geometry/axis.h"
#include "third_party/blink/renderer/core/style/anchor_specifier_value.h"
#include "third_party/blink/renderer/platform/geometry/calculation_value.h"
#include "third_party/blink/renderer/platform/text/writing_mode_utils.h"
#include "third_party/blink/renderer/platform/wtf/static_constructors.h"
namespace blink {
namespace {
inline PhysicalAxes PhysicalAxisFromRegion(
PositionAreaRegion region,
const WritingDirectionMode& container_writing_direction,
const WritingDirectionMode& self_writing_direction) { … }
inline PhysicalAxes PhysicalAxisFromSpan(
PositionAreaRegion start,
PositionAreaRegion end,
const WritingDirectionMode& container_writing_direction,
const WritingDirectionMode& self_writing_direction) { … }
PositionAreaRegion ToPhysicalRegion(
PositionAreaRegion region,
PhysicalAxes axis,
const WritingDirectionMode& container_writing_direction,
const WritingDirectionMode& self_writing_direction) { … }
}
PositionArea PositionArea::ToPhysical(
const WritingDirectionMode& container_writing_direction,
const WritingDirectionMode& self_writing_direction) const { … }
std::optional<AnchorQuery> PositionArea::UsedTop() const { … }
std::optional<AnchorQuery> PositionArea::UsedBottom() const { … }
std::optional<AnchorQuery> PositionArea::UsedLeft() const { … }
std::optional<AnchorQuery> PositionArea::UsedRight() const { … }
std::pair<ItemPosition, ItemPosition> PositionArea::AlignJustifySelfFromPhysical(
WritingDirectionMode container_writing_direction) const { … }
AnchorQuery PositionArea::AnchorTop() { … }
AnchorQuery PositionArea::AnchorBottom() { … }
AnchorQuery PositionArea::AnchorLeft() { … }
AnchorQuery PositionArea::AnchorRight() { … }
}