chromium/third_party/blink/renderer/core/layout/inline/score_line_breaker.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/layout/inline/score_line_breaker.h"

#include "base/containers/adapters.h"
#include "third_party/blink/renderer/core/layout/inline/inline_break_token.h"
#include "third_party/blink/renderer/core/layout/inline/inline_node.h"
#include "third_party/blink/renderer/core/layout/inline/line_breaker.h"
#include "third_party/blink/renderer/core/layout/inline/line_info_list.h"
#include "third_party/blink/renderer/core/layout/inline/line_widths.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_view.h"

namespace blink {

namespace {

// Determines whether `ScoreLineBreaker` should be applied or not from the
// greedy line break results. Because the `ScoreLineBreaker` is expensive,
// and it often produces the similar results to the greedy algorithm, apply
// it only when its benefit is obvious.
ALWAYS_INLINE bool ShouldOptimize(const LineInfoList& line_info_list,
                                  LineBreaker& line_breaker) {}

}  // namespace

void ScoreLineBreaker::SetScoresOutForTesting(Vector<float>* scores_out) {}

void ScoreLineBreaker::OptimalBreakPoints(const LeadingFloats& leading_floats,
                                          ScoreLineBreakContext& context) {}

void ScoreLineBreaker::BalanceBreakPoints(const LeadingFloats& leading_floats,
                                          ScoreLineBreakContext& context) {}

bool ScoreLineBreaker::Optimize(const LineInfoList& line_info_list,
                                LineBreaker& line_breaker,
                                LineBreakPoints& break_points) {}

bool ScoreLineBreaker::ComputeCandidates(const LineInfoList& line_info_list,
                                         LineBreaker& line_breaker,
                                         LineBreakCandidates& candidates) {}

LayoutUnit ScoreLineBreaker::AvailableWidth(wtf_size_t line_index) const {}

void ScoreLineBreaker::ComputeLineWidths(const LineInfoList& line_info_list) {}

void ScoreLineBreaker::SetupParameters() {}

void ScoreLineBreaker::ComputeScores(const LineBreakCandidates& candidates,
                                     LineBreakScores& scores) {}

void ScoreLineBreaker::ComputeBreakPoints(const LineBreakCandidates& candidates,
                                          const LineBreakScores& scores,
                                          LineBreakPoints& break_points) {}

}  // namespace blink