chromium/third_party/blink/renderer/core/html/track/vtt/vtt_parser.cc

/*
 * Copyright (C) 2011 Google Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#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) {}

// A helper class for the construction of a "cue fragment" from the cue text.
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 {}

}  // namespace blink