#include "third_party/blink/renderer/core/html/track/vtt/vtt_parser.h"
#include "base/metrics/histogram_functions.h"
#include "third_party/blink/renderer/core/css/parser/css_parser.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_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/processing_instruction.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/html/track/text_track.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_element.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/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/fetch/text_resource_decoder_options.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/text/segmented_string.h"
#include "third_party/blink/renderer/platform/wtf/date_math.h"
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
const unsigned kFileIdentifierLength = …;
const unsigned kRegionIdentifierLength = …;
const unsigned kStyleIdentifierLength = …;
bool VTTParser::ParsePercentageValue(VTTScanner& value_scanner,
double& percentage) { … }
bool VTTParser::ParsePercentageValuePair(VTTScanner& value_scanner,
char delimiter,
gfx::PointF& value_pair) { … }
VTTParser::VTTParser(VTTParserClient* client, Document& document)
: … { … }
void VTTParser::GetNewCues(HeapVector<Member<TextTrackCue>>& output_cues) { … }
void VTTParser::GetNewStyleSheets(
HeapVector<Member<CSSStyleSheet>>& output_sheets) { … }
void VTTParser::ParseBytes(const char* data, size_t length) { … }
void VTTParser::Flush() { … }
void VTTParser::Parse() { … }
void VTTParser::FlushPendingCue() { … }
bool VTTParser::HasRequiredFileIdentifier(const String& line) { … }
VTTParser::ParseState VTTParser::CollectRegionSettings(const String& line) { … }
VTTParser::ParseState VTTParser::CollectStyleSheet(const String& line) { … }
VTTParser::ParseState VTTParser::CollectWebVTTBlock(const String& line) { … }
VTTParser::ParseState VTTParser::CheckAndRecoverCue(const String& line) { … }
bool VTTParser::CheckAndCreateRegion(const String& line) { … }
bool VTTParser::CheckAndStoreRegion(const String& line) { … }
VTTParser::ParseState VTTParser::CollectCueId(const String& line) { … }
VTTParser::ParseState VTTParser::CollectTimingsAndSettings(const String& line) { … }
VTTParser::ParseState VTTParser::CollectCueText(const String& line) { … }
VTTParser::ParseState VTTParser::RecoverCue(const String& line) { … }
VTTParser::ParseState VTTParser::IgnoreBadCue(const String& line) { … }
class VTTTreeBuilder { … };
DocumentFragment* VTTTreeBuilder::BuildFromString(const String& cue_text) { … }
DocumentFragment* VTTParser::CreateDocumentFragmentFromCueText(
Document& document,
const String& cue_text,
TextTrack* track) { … }
void VTTParser::CreateNewCue() { … }
void VTTParser::ResetCueValues() { … }
bool VTTParser::CollectTimeStamp(const String& line, double& time_stamp) { … }
static String SerializeTimeStamp(double time_stamp) { … }
bool VTTParser::CollectTimeStamp(VTTScanner& input, double& time_stamp) { … }
static VttNodeType TokenToNodeType(VTTToken& token) { … }
void VTTTreeBuilder::ConstructTreeFromToken(Document& document) { … }
void VTTParser::Trace(Visitor* visitor) const { … }
}