Commit 347377f5 authored by Hwanseung Lee's avatar Hwanseung Lee Committed by Commit Bot

Rename ListMarkerText namepsace to list_marker_text

https://google.github.io/styleguide/cppguide.html#Namespace_Names
> Namespace names are all lower-case.

This CL has no behavior changes.

Bug: 889726
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I857b97d2fd8b87db3563dd6845399d977a07f68c
Reviewed-on: https://chromium-review.googlesource.com/c/1258682Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Hwanseung Lee <hs1217.lee@samsung.com>
Cr-Commit-Position: refs/heads/master@{#596418}
parent 51682ae0
......@@ -498,14 +498,14 @@ scoped_refptr<StringImpl> LayoutCounter::OriginalText() const {
CounterNode* child = counter_node_;
int value = child->ActsAsReset() ? child->Value() : child->CountInParent();
String text = ListMarkerText::GetText(counter_.ListStyle(), value);
String text = list_marker_text::GetText(counter_.ListStyle(), value);
if (!counter_.Separator().IsNull()) {
if (!child->ActsAsReset())
child = child->Parent();
while (CounterNode* parent = child->Parent()) {
text = ListMarkerText::GetText(counter_.ListStyle(),
child->CountInParent()) +
text = list_marker_text::GetText(counter_.ListStyle(),
child->CountInParent()) +
counter_.Separator() + text;
child = parent;
}
......
......@@ -194,19 +194,19 @@ void LayoutListMarker::UpdateContent() {
case ListStyleCategory::kNone:
break;
case ListStyleCategory::kSymbol:
text_ = ListMarkerText::GetText(StyleRef().ListStyleType(),
0); // value is ignored for these types
text_ = list_marker_text::GetText(StyleRef().ListStyleType(),
0); // value is ignored for these types
break;
case ListStyleCategory::kLanguage:
text_ = ListMarkerText::GetText(StyleRef().ListStyleType(),
list_item_->Value());
text_ = list_marker_text::GetText(StyleRef().ListStyleType(),
list_item_->Value());
break;
}
}
String LayoutListMarker::TextAlternative() const {
UChar suffix =
ListMarkerText::Suffix(StyleRef().ListStyleType(), list_item_->Value());
list_marker_text::Suffix(StyleRef().ListStyleType(), list_item_->Value());
// Return suffix after the marker text, even in RTL, reflecting speech order.
return text_ + suffix + ' ';
}
......@@ -219,7 +219,7 @@ LayoutUnit LayoutListMarker::GetWidthOfTextWithSuffix() const {
// TODO(wkorman): Look into constructing a text run for both text and suffix
// and painting them together.
UChar suffix[2] = {
ListMarkerText::Suffix(StyleRef().ListStyleType(), list_item_->Value()),
list_marker_text::Suffix(StyleRef().ListStyleType(), list_item_->Value()),
' '};
TextRun run =
ConstructTextRun(font, suffix, 2, StyleRef(), StyleRef().Direction());
......
......@@ -31,7 +31,7 @@
namespace blink {
namespace ListMarkerText {
namespace list_marker_text {
enum SequenceType { kNumericSequence, kAlphabeticSequence };
......@@ -924,6 +924,6 @@ String GetText(EListStyleType type, int count) {
return "";
}
} // namespace ListMarkerText
} // namespace list_marker_text
} // namespace blink
......@@ -33,7 +33,7 @@ namespace blink {
// Utility routines for working with lists. Encapsulates complex
// language-specific logic including fallback to alternate languages when
// counter values cannot be represented in a particular language.
namespace ListMarkerText {
namespace list_marker_text {
// Returns the suffix character, such as '.', for the given list type and
// item count number.
......@@ -43,7 +43,7 @@ UChar Suffix(EListStyleType, int count);
// type and item count number. Does not include any suffix character.
String GetText(EListStyleType, int count);
} // namespace ListMarkerText
} // namespace list_marker_text
} // namespace blink
......
......@@ -178,7 +178,7 @@ LayoutNGListItem::MarkerType LayoutNGListItem::MarkerText(
case EListStyleType::kCircle:
case EListStyleType::kSquare:
// value is ignored for these types
text->Append(ListMarkerText::GetText(Style()->ListStyleType(), 0));
text->Append(list_marker_text::GetText(Style()->ListStyleType(), 0));
if (format == kWithSuffix)
text->Append(' ');
return kSymbolValue;
......@@ -235,9 +235,9 @@ LayoutNGListItem::MarkerType LayoutNGListItem::MarkerText(
case EListStyleType::kUpperRoman:
case EListStyleType::kUrdu: {
int value = Value();
text->Append(ListMarkerText::GetText(Style()->ListStyleType(), value));
text->Append(list_marker_text::GetText(Style()->ListStyleType(), value));
if (format == kWithSuffix) {
text->Append(ListMarkerText::Suffix(Style()->ListStyleType(), value));
text->Append(list_marker_text::Suffix(Style()->ListStyleType(), value));
text->Append(' ');
}
return kOrdinalValue;
......
......@@ -157,8 +157,8 @@ void ListMarkerPainter::Paint(const PaintInfo& paint_info) {
}
const UChar suffix =
ListMarkerText::Suffix(layout_list_marker_.StyleRef().ListStyleType(),
layout_list_marker_.ListItem()->Value());
list_marker_text::Suffix(layout_list_marker_.StyleRef().ListStyleType(),
layout_list_marker_.ListItem()->Value());
UChar suffix_str[2] = {suffix, static_cast<UChar>(' ')};
TextRun suffix_run =
ConstructTextRun(font, suffix_str, 2, layout_list_marker_.StyleRef(),
......
......@@ -421,6 +421,13 @@ _CONFIG = [
],
'allowed': ['ui::NativeTheme.*'],
},
{
'paths': [
'third_party/blink/renderer/core/layout/',
'third_party/blink/renderer/core/paint/',
],
'allowed': ['list_marker_text::.+'],
},
{
'paths': [
'third_party/blink/renderer/modules/crypto/',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment