| Index: content/browser/renderer_host/render_widget_host_view_aura.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| index 8499348116f1f071758b2f6f572737449e74f545..020ef239c6115d68539a8dee8111fb249120b734 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -1280,17 +1280,18 @@ void RenderWidgetHostViewAura::SetCompositionText(
|
| if (!host_)
|
| return;
|
|
|
| - // ui::CompositionUnderline should be identical to
|
| - // blink::WebCompositionUnderline, so that we can do reinterpret_cast safely.
|
| - COMPILE_ASSERT(sizeof(ui::CompositionUnderline) ==
|
| - sizeof(blink::WebCompositionUnderline),
|
| - ui_CompositionUnderline__WebKit_WebCompositionUnderline_diff);
|
| -
|
| // TODO(suzhe): convert both renderer_host and renderer to use
|
| // ui::CompositionText.
|
| - const std::vector<blink::WebCompositionUnderline>& underlines =
|
| - reinterpret_cast<const std::vector<blink::WebCompositionUnderline>&>(
|
| - composition.underlines);
|
| + std::vector<blink::WebCompositionUnderline> underlines;
|
| + underlines.reserve(composition.underlines.size());
|
| + for (std::vector<ui::CompositionUnderline>::const_iterator it =
|
| + composition.underlines.begin();
|
| + it != composition.underlines.end(); ++it) {
|
| + underlines.push_back(blink::WebCompositionUnderline(it->start_offset,
|
| + it->end_offset,
|
| + it->color,
|
| + it->thick));
|
| + }
|
|
|
| // TODO(suzhe): due to a bug of webkit, we can't use selection range with
|
| // composition string. See: https://bugs.webkit.org/show_bug.cgi?id=37788
|
|
|