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,13 +498,13 @@ scoped_refptr<StringImpl> LayoutCounter::OriginalText() const { ...@@ -498,13 +498,13 @@ scoped_refptr<StringImpl> LayoutCounter::OriginalText() const {
CounterNode* child = counter_node_; CounterNode* child = counter_node_;
int value = child->ActsAsReset() ? child->Value() : child->CountInParent(); 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 (!counter_.Separator().IsNull()) {
if (!child->ActsAsReset()) if (!child->ActsAsReset())
child = child->Parent(); child = child->Parent();
while (CounterNode* parent = child->Parent()) { while (CounterNode* parent = child->Parent()) {
text = ListMarkerText::GetText(counter_.ListStyle(), text = list_marker_text::GetText(counter_.ListStyle(),
child->CountInParent()) + child->CountInParent()) +
counter_.Separator() + text; counter_.Separator() + text;
child = parent; child = parent;
......
...@@ -194,11 +194,11 @@ void LayoutListMarker::UpdateContent() { ...@@ -194,11 +194,11 @@ void LayoutListMarker::UpdateContent() {
case ListStyleCategory::kNone: case ListStyleCategory::kNone:
break; break;
case ListStyleCategory::kSymbol: case ListStyleCategory::kSymbol:
text_ = ListMarkerText::GetText(StyleRef().ListStyleType(), text_ = list_marker_text::GetText(StyleRef().ListStyleType(),
0); // value is ignored for these types 0); // value is ignored for these types
break; break;
case ListStyleCategory::kLanguage: case ListStyleCategory::kLanguage:
text_ = ListMarkerText::GetText(StyleRef().ListStyleType(), text_ = list_marker_text::GetText(StyleRef().ListStyleType(),
list_item_->Value()); list_item_->Value());
break; break;
} }
...@@ -206,7 +206,7 @@ void LayoutListMarker::UpdateContent() { ...@@ -206,7 +206,7 @@ void LayoutListMarker::UpdateContent() {
String LayoutListMarker::TextAlternative() const { String LayoutListMarker::TextAlternative() const {
UChar suffix = 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 suffix after the marker text, even in RTL, reflecting speech order.
return text_ + suffix + ' '; return text_ + suffix + ' ';
} }
...@@ -219,7 +219,7 @@ LayoutUnit LayoutListMarker::GetWidthOfTextWithSuffix() const { ...@@ -219,7 +219,7 @@ LayoutUnit LayoutListMarker::GetWidthOfTextWithSuffix() const {
// TODO(wkorman): Look into constructing a text run for both text and suffix // TODO(wkorman): Look into constructing a text run for both text and suffix
// and painting them together. // and painting them together.
UChar suffix[2] = { UChar suffix[2] = {
ListMarkerText::Suffix(StyleRef().ListStyleType(), list_item_->Value()), list_marker_text::Suffix(StyleRef().ListStyleType(), list_item_->Value()),
' '}; ' '};
TextRun run = TextRun run =
ConstructTextRun(font, suffix, 2, StyleRef(), StyleRef().Direction()); ConstructTextRun(font, suffix, 2, StyleRef(), StyleRef().Direction());
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
namespace blink { namespace blink {
namespace ListMarkerText { namespace list_marker_text {
enum SequenceType { kNumericSequence, kAlphabeticSequence }; enum SequenceType { kNumericSequence, kAlphabeticSequence };
...@@ -924,6 +924,6 @@ String GetText(EListStyleType type, int count) { ...@@ -924,6 +924,6 @@ String GetText(EListStyleType type, int count) {
return ""; return "";
} }
} // namespace ListMarkerText } // namespace list_marker_text
} // namespace blink } // namespace blink
...@@ -33,7 +33,7 @@ namespace blink { ...@@ -33,7 +33,7 @@ namespace blink {
// Utility routines for working with lists. Encapsulates complex // Utility routines for working with lists. Encapsulates complex
// language-specific logic including fallback to alternate languages when // language-specific logic including fallback to alternate languages when
// counter values cannot be represented in a particular language. // 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 // Returns the suffix character, such as '.', for the given list type and
// item count number. // item count number.
...@@ -43,7 +43,7 @@ UChar Suffix(EListStyleType, int count); ...@@ -43,7 +43,7 @@ UChar Suffix(EListStyleType, int count);
// type and item count number. Does not include any suffix character. // type and item count number. Does not include any suffix character.
String GetText(EListStyleType, int count); String GetText(EListStyleType, int count);
} // namespace ListMarkerText } // namespace list_marker_text
} // namespace blink } // namespace blink
......
...@@ -178,7 +178,7 @@ LayoutNGListItem::MarkerType LayoutNGListItem::MarkerText( ...@@ -178,7 +178,7 @@ LayoutNGListItem::MarkerType LayoutNGListItem::MarkerText(
case EListStyleType::kCircle: case EListStyleType::kCircle:
case EListStyleType::kSquare: case EListStyleType::kSquare:
// value is ignored for these types // 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) if (format == kWithSuffix)
text->Append(' '); text->Append(' ');
return kSymbolValue; return kSymbolValue;
...@@ -235,9 +235,9 @@ LayoutNGListItem::MarkerType LayoutNGListItem::MarkerText( ...@@ -235,9 +235,9 @@ LayoutNGListItem::MarkerType LayoutNGListItem::MarkerText(
case EListStyleType::kUpperRoman: case EListStyleType::kUpperRoman:
case EListStyleType::kUrdu: { case EListStyleType::kUrdu: {
int value = Value(); int value = Value();
text->Append(ListMarkerText::GetText(Style()->ListStyleType(), value)); text->Append(list_marker_text::GetText(Style()->ListStyleType(), value));
if (format == kWithSuffix) { if (format == kWithSuffix) {
text->Append(ListMarkerText::Suffix(Style()->ListStyleType(), value)); text->Append(list_marker_text::Suffix(Style()->ListStyleType(), value));
text->Append(' '); text->Append(' ');
} }
return kOrdinalValue; return kOrdinalValue;
......
...@@ -157,7 +157,7 @@ void ListMarkerPainter::Paint(const PaintInfo& paint_info) { ...@@ -157,7 +157,7 @@ void ListMarkerPainter::Paint(const PaintInfo& paint_info) {
} }
const UChar suffix = const UChar suffix =
ListMarkerText::Suffix(layout_list_marker_.StyleRef().ListStyleType(), list_marker_text::Suffix(layout_list_marker_.StyleRef().ListStyleType(),
layout_list_marker_.ListItem()->Value()); layout_list_marker_.ListItem()->Value());
UChar suffix_str[2] = {suffix, static_cast<UChar>(' ')}; UChar suffix_str[2] = {suffix, static_cast<UChar>(' ')};
TextRun suffix_run = TextRun suffix_run =
......
...@@ -421,6 +421,13 @@ _CONFIG = [ ...@@ -421,6 +421,13 @@ _CONFIG = [
], ],
'allowed': ['ui::NativeTheme.*'], 'allowed': ['ui::NativeTheme.*'],
}, },
{
'paths': [
'third_party/blink/renderer/core/layout/',
'third_party/blink/renderer/core/paint/',
],
'allowed': ['list_marker_text::.+'],
},
{ {
'paths': [ 'paths': [
'third_party/blink/renderer/modules/crypto/', '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