Chromium Code Reviews| Index: ui/views/cocoa/bridged_content_view.mm |
| diff --git a/ui/views/cocoa/bridged_content_view.mm b/ui/views/cocoa/bridged_content_view.mm |
| index e1c7497c1814578fca72bac2b56749befc3982d3..a44efb6b5553c85c4bf9fb1c4744cdd2945eb68b 100644 |
| --- a/ui/views/cocoa/bridged_content_view.mm |
| +++ b/ui/views/cocoa/bridged_content_view.mm |
| @@ -1237,6 +1237,16 @@ - (void)setMarkedText:(id)text |
| ui::CompositionText composition; |
| composition.text = base::SysNSStringToUTF16(text); |
| composition.selection = gfx::Range(selectedRange); |
| + |
| + // Add a black underline with a transparent background to the composition |
| + // text. TODO(karandeepb): On Cocoa textfields, the target clause of the |
| + // composition has a thick underlines. The composition text also has |
| + // discontinous underlines for different clauses. This is also supported in |
| + // the Chrome renderer. Add code to extract underlines from |text| once our |
| + // render text implementation supports thick underlines and discontinous |
| + // underlines for consecutive characters. |
|
tapted
2016/08/05 05:46:50
nit: The TODO should cite a bug. You can probably
karandeepb
2016/08/05 06:16:05
Done.
|
| + composition.underlines.push_back(ui::CompositionUnderline( |
| + 0, [text length], SK_ColorBLACK, false, SK_ColorTRANSPARENT)); |
| textInputClient_->SetCompositionText(composition); |
| } |