chromium/third_party/blink/renderer/core/animation/view_timeline.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/animation/view_timeline.h"

#include <optional>

#include "third_party/blink/renderer/bindings/core/v8/v8_union_cssnumericvalue_string.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_cssnumericvalueorstringsequence_string.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_view_timeline.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_view_timeline_options.h"
#include "third_party/blink/renderer/core/animation/keyframe_effect.h"
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/css_to_length_conversion_data.h"
#include "third_party/blink/renderer/core/css/css_value_list.h"
#include "third_party/blink/renderer/core/css/css_value_pair.h"
#include "third_party/blink/renderer/core/css/cssom/css_unit_value.h"
#include "third_party/blink/renderer/core/css/cssom/css_unit_values.h"
#include "third_party/blink/renderer/core/css/parser/css_parser.h"
#include "third_party/blink/renderer/core/css/resolver/element_resolve_context.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_root.h"
#include "third_party/blink/renderer/core/page/scrolling/sticky_position_scrolling_constraints.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/platform/geometry/calculation_value.h"

namespace blink {

InsetValueSequence;

namespace {

bool IsBlockDirection(ViewTimeline::ScrollAxis axis, WritingMode writing_mode) {}

// ResolveAuto replaces any value 'auto' with the value of the corresponding
// scroll-padding-* property. Note that 'auto' is a valid value for
// scroll-padding-*, and therefore 'auto' (the "pointer" to the scroll-padding
// value) may resolve to 'auto' (the actual value of the scroll-padding
// property).
//
// https://drafts.csswg.org/scroll-animations-1/#valdef-view-timeline-inset-auto
TimelineInset ResolveAuto(const TimelineInset& inset,
                          Element& source,
                          ViewTimeline::ScrollAxis axis) {}

LayoutUnit ComputeInset(const Length& inset, LayoutUnit viewport_size) {}

const CSSValue* ParseInset(const InsetValueSequence& array,
                           wtf_size_t index,
                           ExceptionState& exception_state) {}

const CSSValuePair* ParseInsetPair(Document& document, const String str_value) {}

bool IsStyleDependent(const CSSValue* value) {}

Length InsetValueToLength(const CSSValue* inset_value,
                          Element* subject,
                          Length default_value) {}

enum class StickinessRange {};

StickinessRange ComputeStickinessRange(
    LayoutUnit sticky_box_stuck_pos_in_viewport,
    LayoutUnit sticky_box_static_pos,
    double viewport_size,
    double target_size,
    double target_pos) {}

}  // end namespace

ViewTimeline* ViewTimeline::Create(Document& document,
                                   ViewTimelineOptions* options,
                                   ExceptionState& exception_state) {}

ViewTimeline::ViewTimeline(Document* document,
                           Element* subject,
                           ScrollAxis axis,
                           TimelineInset inset)
    :{}

void ViewTimeline::CalculateOffsets(PaintLayerScrollableArea* scrollable_area,
                                    ScrollOrientation physical_orientation,
                                    TimelineState* state) const {}

void ViewTimeline::ApplyStickyAdjustments(ScrollOffsets& scroll_offsets,
                                          ViewOffsets& view_offsets,
                                          double viewport_size,
                                          double target_size,
                                          double target_offset,
                                          ScrollOrientation orientation,
                                          LayoutBox* scroll_container) const {}

std::optional<gfx::SizeF> ViewTimeline::SubjectSize() const {}

std::optional<gfx::PointF> ViewTimeline::SubjectPosition(
    LayoutBox* scroll_container) const {}

// https://www.w3.org/TR/scroll-animations-1/#named-range-getTime
CSSNumericValue* ViewTimeline::getCurrentTime(const String& rangeName) {}

Element* ViewTimeline::subject() const {}

bool ViewTimeline::Matches(Element* subject,
                           ScrollAxis axis,
                           const TimelineInset& inset) const {}

const TimelineInset& ViewTimeline::GetInset() const {}

double ViewTimeline::ToFractionalOffset(
    const TimelineOffset& timeline_offset) const {}

CSSNumericValue* ViewTimeline::startOffset() const {}

CSSNumericValue* ViewTimeline::endOffset() const {}

void ViewTimeline::Trace(Visitor* visitor) const {}

}  // namespace blink