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

/*
 * Copyright (C) 2013 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_region.h"

#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/dom/dom_token_list.h"
#include "third_party/blink/renderer/core/dom/element_traversal.h"
#include "third_party/blink/renderer/core/geometry/dom_rect.h"
#include "third_party/blink/renderer/core/html/html_div_element.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_cue_box.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_parser.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/scheduler/public/thread.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"

#define VTT_LOG_LEVEL

namespace blink {

namespace {
// The following values default values are defined within the WebVTT Regions
// Spec.
// https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html

// The region occupies by default 100% of the width of the video viewport.
constexpr double kDefaultRegionWidth =;

// The region has, by default, 3 lines of text.
constexpr int kDefaultHeightInLines =;

// The region and viewport are anchored in the bottom left corner.
constexpr double kDefaultAnchorPointX =;
constexpr double kDefaultAnchorPointY =;

// The region doesn't have scrolling text, by default.
constexpr bool kDefaultScroll =;

// Default region line-height (vh units)
constexpr float kLineHeight =;

// Default scrolling animation time period (s).
constexpr base::TimeDelta kScrollTime =;

bool IsNonPercentage(double value,
                     const char* method,
                     ExceptionState& exception_state) {}

}  // namespace

VTTRegion::VTTRegion(Document& document)
    :{}

VTTRegion::~VTTRegion() = default;

void VTTRegion::setId(const String& id) {}

void VTTRegion::setWidth(double value, ExceptionState& exception_state) {}

void VTTRegion::setLines(unsigned value) {}

void VTTRegion::setRegionAnchorX(double value,
                                 ExceptionState& exception_state) {}

void VTTRegion::setRegionAnchorY(double value,
                                 ExceptionState& exception_state) {}

void VTTRegion::setViewportAnchorX(double value,
                                   ExceptionState& exception_state) {}

void VTTRegion::setViewportAnchorY(double value,
                                   ExceptionState& exception_state) {}

const AtomicString VTTRegion::scroll() const {}

void VTTRegion::setScroll(const AtomicString& value) {}

void VTTRegion::SetRegionSettings(const String& input_string) {}

VTTRegion::RegionSetting VTTRegion::ScanSettingName(VTTScanner& input) {}

static inline bool ParsedEntireRun(const VTTScanner& input,
                                   const VTTScanner::Run& run) {}

void VTTRegion::ParseSettingValue(RegionSetting setting, VTTScanner& input) {}

const AtomicString& VTTRegion::TextTrackCueContainerScrollingClass() {}

HTMLDivElement* VTTRegion::GetDisplayTree(Document& document) {}

void VTTRegion::WillRemoveVTTCueBox(VTTCueBox* box) {}

void VTTRegion::AppendVTTCueBox(VTTCueBox* display_box) {}

void VTTRegion::DisplayLastVTTCueBox() {}

void VTTRegion::PrepareRegionDisplayTree() {}

void VTTRegion::StartTimer() {}

void VTTRegion::StopTimer() {}

void VTTRegion::ScrollTimerFired(TimerBase*) {}

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

}  // namespace blink