Commit e720ea21 authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

GCC: rename Color getter to LineColor in TextDecorationInfo to avoid clashing with Color type

GCC fails to compile the Color getter in TextDecorationInfo, as it
gets confused by different declarations in different namespaces:
../../third_party/blink/renderer/core/paint/text_decoration_info.h: At global scope:
../../third_party/blink/renderer/core/paint/text_decoration_info.h:76:9: error: declaration of ‘blink::Color blink::TextDecorationInfo::Color() const’ changes meaning of ‘Color’ [-fpermissive]
   76 |   Color Color() const;
      |         ^~~~~

To avoid that, we rename the getter to be LineColor.

Bug: 819294
Change-Id: I5b1a0d8a9c4580029ba8148281f9a3a514a88b62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339487
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795934}
parent 8cf0e258
...@@ -10,7 +10,7 @@ namespace blink { ...@@ -10,7 +10,7 @@ namespace blink {
void AppliedDecorationPainter::Paint() { void AppliedDecorationPainter::Paint() {
context_.SetStrokeStyle(decoration_info_.StrokeStyle()); context_.SetStrokeStyle(decoration_info_.StrokeStyle());
context_.SetStrokeColor(decoration_info_.Color()); context_.SetStrokeColor(decoration_info_.LineColor());
switch (decoration_info_.DecorationStyle()) { switch (decoration_info_.DecorationStyle()) {
case ETextDecorationStyle::kWavy: case ETextDecorationStyle::kWavy:
......
...@@ -200,7 +200,7 @@ ETextDecorationStyle TextDecorationInfo::DecorationStyle() const { ...@@ -200,7 +200,7 @@ ETextDecorationStyle TextDecorationInfo::DecorationStyle() const {
return style_.AppliedTextDecorations()[decoration_index_].Style(); return style_.AppliedTextDecorations()[decoration_index_].Style();
} }
Color TextDecorationInfo::Color() const { Color TextDecorationInfo::LineColor() const {
return style_.AppliedTextDecorations()[decoration_index_].GetColor(); return style_.AppliedTextDecorations()[decoration_index_].GetColor();
} }
......
...@@ -73,7 +73,7 @@ class CORE_EXPORT TextDecorationInfo { ...@@ -73,7 +73,7 @@ class CORE_EXPORT TextDecorationInfo {
// SetDecorationIndex must be called before using these methods. // SetDecorationIndex must be called before using these methods.
ETextDecorationStyle DecorationStyle() const; ETextDecorationStyle DecorationStyle() const;
Color Color() const; Color LineColor() const;
float ResolvedThickness() const { float ResolvedThickness() const {
return applied_decorations_thickness_[decoration_index_]; return applied_decorations_thickness_[decoration_index_];
} }
......
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