chromium/third_party/blink/renderer/platform/text/layout_locale.cc

// Copyright 2016 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/platform/text/layout_locale.h"

#include <hb.h>
#include <unicode/locid.h>
#include <unicode/ulocdata.h>

#include <array>

#include "base/compiler_specific.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "third_party/blink/renderer/platform/language.h"
#include "third_party/blink/renderer/platform/text/hyphenation.h"
#include "third_party/blink/renderer/platform/text/icu_error.h"
#include "third_party/blink/renderer/platform/text/locale_to_script_mapping.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string_hash.h"
#include "third_party/blink/renderer/platform/wtf/text/case_folding_hash.h"
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"

namespace blink {

namespace {

struct PerThreadData {};

PerThreadData& GetPerThreadData() {}

struct DelimiterConfig {};
// Use  ICU ulocdata to find quote delimiters for an ICU locale
// https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ulocdata_8h.html#a0bf1fdd1a86918871ae2c84b5ce8421f
scoped_refptr<QuotesData> GetQuotesDataForLanguage(const char* locale) {}

// Returns the Unicode Line Break Style Identifier (key "lb") value.
// https://www.unicode.org/reports/tr35/#UnicodeLineBreakStyleIdentifier
inline const char* LbValueFromStrictness(LineBreakStrictness strictness) {}

}  // namespace

static hb_language_t ToHarfbuzLanguage(const AtomicString& locale) {}

// SkFontMgr uses two/three-letter language code with an optional ISO 15924
// four-letter script code, in POSIX style (with '-' as the separator,) such as
// "zh-Hant" and "zh-Hans". See `fonts.xml`.
static const char* ToSkFontMgrLocale(UScriptCode script) {}

const char* LayoutLocale::LocaleForSkFontMgr() const {}

void LayoutLocale::ComputeScriptForHan() const {}

UScriptCode LayoutLocale::GetScriptForHan() const {}

bool LayoutLocale::HasScriptForHan() const {}

// static
const LayoutLocale* LayoutLocale::LocaleForHan(
    const LayoutLocale* content_locale) {}

const char* LayoutLocale::LocaleForHanForSkFontMgr() const {}

void LayoutLocale::ComputeCaseMapLocale() const {}

LayoutLocale::LayoutLocale(const AtomicString& locale)
    :{}

// static
const LayoutLocale* LayoutLocale::Get(const AtomicString& locale) {}

// static
const LayoutLocale& LayoutLocale::GetDefault() {}

// static
const LayoutLocale& LayoutLocale::GetSystem() {}

scoped_refptr<LayoutLocale> LayoutLocale::CreateForTesting(
    const AtomicString& locale) {}

Hyphenation* LayoutLocale::GetHyphenation() const {}

void LayoutLocale::SetHyphenationForTesting(
    const AtomicString& locale_string,
    scoped_refptr<Hyphenation> hyphenation) {}

scoped_refptr<QuotesData> LayoutLocale::GetQuotesData() const {}

AtomicString LayoutLocale::LocaleWithBreakKeyword(
    LineBreakStrictness strictness,
    bool use_phrase) const {}

// static
void LayoutLocale::AcceptLanguagesChanged(const String& accept_languages) {}

// static
void LayoutLocale::ClearForTesting() {}

}  // namespace blink