#include "third_party/blink/renderer/core/html/track/vtt/vtt_cue_layout_algorithm.h"
#include <math.h>
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_cue.h"
#include "third_party/blink/renderer/core/html/track/vtt/vtt_cue_box.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
namespace blink {
namespace {
gfx::Rect BorderBoxRelativeToAncestor(const LayoutBox& box,
const LayoutBoxModelObject& ancestor) { … }
gfx::Rect ComputeControlsRect(const LayoutObject& container) { … }
}
VttCueLayoutAlgorithm::VttCueLayoutAlgorithm(VTTCueBox& cue)
: … { … }
void VttCueLayoutAlgorithm::Layout() { … }
PhysicalSize VttCueLayoutAlgorithm::FirstInlineBoxSize(
const LayoutBox& cue_box) { … }
LayoutUnit VttCueLayoutAlgorithm::ComputeInitialPositionAdjustment(
LayoutUnit max_dimension,
const gfx::Rect& controls_rect) { … }
gfx::Rect VttCueLayoutAlgorithm::CueBoundingBox(const LayoutBox& cue_box) { … }
bool VttCueLayoutAlgorithm::IsOutside(const gfx::Rect& title_area) const { … }
bool VttCueLayoutAlgorithm::IsOverlapping(
const gfx::Rect& controls_rect) const { … }
bool VttCueLayoutAlgorithm::ShouldSwitchDirection(
LayoutUnit cue_block_position,
LayoutUnit cue_block_size,
LayoutUnit full_dimension) const { … }
void VttCueLayoutAlgorithm::AdjustPositionWithSnapToLines() { … }
void VttCueLayoutAlgorithm::AdjustPositionWithoutSnapToLines() { … }
}