Commit 529e0349 authored by Anupam Snigdha's avatar Anupam Snigdha Committed by Commit Bot

Removed default underline style in TSF.

On Windows, dictation comes as a composition and in some cases
the underline style is set as TF_LS_NONE to differentiate between
high confidence and low confidence words. This patch removes the
default initialization of underline style to solid so the dictation
composition could also apply none style when it wants to.

Bug: 1033764
Change-Id: I41f5904129686858c5d729fe26e6a312fd9beaea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134918Reviewed-by: default avatarYohei Yukawa <yukawa@chromium.org>
Commit-Queue: Anupam Snigdha <snianu@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#756132}
parent a0d18c16
......@@ -1415,28 +1415,29 @@ void TSFTextStore::GetStyle(const TF_DISPLAYATTRIBUTE& attribute,
// any style or not.
span->thickness = attribute.fBoldLine ? ImeTextSpan::Thickness::kThick
: ImeTextSpan::Thickness::kThin;
span->underline_style = ImeTextSpan::UnderlineStyle::kSolid;
if (attribute.lsStyle != TF_LS_NONE) {
switch (attribute.lsStyle) {
case TF_LS_SOLID: {
span->underline_style = ImeTextSpan::UnderlineStyle::kSolid;
break;
}
case TF_LS_DOT: {
span->underline_style = ImeTextSpan::UnderlineStyle::kDot;
break;
}
case TF_LS_DASH: {
span->underline_style = ImeTextSpan::UnderlineStyle::kDash;
break;
}
case TF_LS_SQUIGGLE: {
span->underline_style = ImeTextSpan::UnderlineStyle::kSquiggle;
break;
}
default: {
span->underline_style = ImeTextSpan::UnderlineStyle::kSolid;
}
switch (attribute.lsStyle) {
case TF_LS_SOLID: {
span->underline_style = ImeTextSpan::UnderlineStyle::kSolid;
break;
}
case TF_LS_DOT: {
span->underline_style = ImeTextSpan::UnderlineStyle::kDot;
break;
}
case TF_LS_DASH: {
span->underline_style = ImeTextSpan::UnderlineStyle::kDash;
break;
}
case TF_LS_SQUIGGLE: {
span->underline_style = ImeTextSpan::UnderlineStyle::kSquiggle;
break;
}
case TF_LS_NONE: {
span->underline_style = ImeTextSpan::UnderlineStyle::kNone;
break;
}
default: {
span->underline_style = ImeTextSpan::UnderlineStyle::kSolid;
}
}
if (attribute.crText.type != TF_CT_NONE) {
......
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