#include "third_party/blink/renderer/core/html/track/vtt/vtt_cue.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_autokeyword_double.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/core/dom/document_fragment.h"
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/dom/node_cloning_data.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/html/html_div_element.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include "third_party/blink/renderer/core/html/track/text_track.h"
#include "third_party/blink/renderer/core/html/track/text_track_cue_list.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_cue_box.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_element.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_parser.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_region.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h"
#include "third_party/blink/renderer/platform/bindings/exception_messages.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/text/bidi_paragraph.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
namespace {
bool ScanRun(const VTTScanner::Run& value_run,
AlignSetting align,
VTTScanner& scanner) { … }
const auto kDisplayWritingModeMap = …;
static_assert …;
const auto kDisplayAlignmentMap = …;
static_assert …;
const String& HorizontalKeyword() { … }
const String& VerticalGrowingLeftKeyword() { … }
const String& VerticalGrowingRightKeyword() { … }
bool IsInvalidPercentage(double value) { … }
bool IsInvalidPercentage(double value, ExceptionState& exception_state) { … }
}
VTTCueBackgroundBox::VTTCueBackgroundBox(Document& document)
: … { … }
void VTTCueBackgroundBox::Trace(Visitor* visitor) const { … }
void VTTCueBackgroundBox::DidRecalcStyle(const StyleRecalcChange change) { … }
void VTTCueBackgroundBox::SetTrack(TextTrack* track) { … }
VTTCue::VTTCue(Document& document,
double start_time,
double end_time,
const String& text)
: … { … }
VTTCue::~VTTCue() = default;
#ifndef NDEBUG
String VTTCue::ToString() const { … }
#endif
void VTTCue::CueDidChange(CueMutationAffectsOrder affects_order) { … }
const String& VTTCue::vertical() const { … }
void VTTCue::setVertical(const String& value) { … }
void VTTCue::setSnapToLines(bool value) { … }
bool VTTCue::LineIsAuto() const { … }
V8UnionAutoKeywordOrDouble* VTTCue::line() const { … }
void VTTCue::setLine(const V8UnionAutoKeywordOrDouble* position) { … }
bool VTTCue::TextPositionIsAuto() const { … }
V8UnionAutoKeywordOrDouble* VTTCue::position() const { … }
void VTTCue::setPosition(const V8UnionAutoKeywordOrDouble* position,
ExceptionState& exception_state) { … }
void VTTCue::setSize(double size, ExceptionState& exception_state) { … }
V8AlignSetting VTTCue::align() const { … }
void VTTCue::setAlign(const V8AlignSetting& value) { … }
void VTTCue::setText(const String& text) { … }
void VTTCue::CreateVTTNodeTree() { … }
void VTTCue::CopyVTTNodeToDOMTree(ContainerNode* vtt_node,
ContainerNode* parent) { … }
DocumentFragment* VTTCue::getCueAsHTML() { … }
void VTTCue::setRegion(VTTRegion* region) { … }
double VTTCue::CalculateComputedLinePosition() const { … }
static CSSValueID DetermineTextDirection(DocumentFragment* vtt_root) { … }
double VTTCue::CalculateComputedTextPosition() const { … }
AlignSetting VTTCue::CalculateComputedCueAlignment() const { … }
VTTDisplayParameters::VTTDisplayParameters()
: … { … }
VTTDisplayParameters VTTCue::CalculateDisplayParameters() const { … }
void VTTCue::UpdatePastAndFutureNodes(double movie_time) { … }
std::optional<double> VTTCue::GetNextIntraCueTime(double movie_time) const { … }
VTTCueBox* VTTCue::GetDisplayTree() { … }
void VTTCue::RemoveDisplayTree(RemovalNotification removal_notification) { … }
void VTTCue::OnEnter(HTMLMediaElement& video) { … }
void VTTCue::OnExit(HTMLMediaElement& video) { … }
void VTTCue::UpdateDisplay(HTMLDivElement& container) { … }
VTTCue::CueSetting VTTCue::SettingName(VTTScanner& input) const { … }
static bool ScanPercentage(VTTScanner& input, double& number) { … }
void VTTCue::ParseSettings(const VTTRegionMap* region_map,
const String& input_string) { … }
ExecutionContext* VTTCue::GetExecutionContext() const { … }
Document& VTTCue::GetDocument() const { … }
void VTTCue::Trace(Visitor* visitor) const { … }
}