Chromium Code Reviews| Index: content/renderer/render_view_impl.cc |
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
| index 33a12a578e881631b3de32038ca0ee9613dccd76..136c52b16575f88367b921e3f6f1b8091593a7ef 100644 |
| --- a/content/renderer/render_view_impl.cc |
| +++ b/content/renderer/render_view_impl.cc |
| @@ -1888,21 +1888,24 @@ bool RenderViewImpl::runFileChooser( |
| void RenderViewImpl::showValidationMessage( |
| const blink::WebRect& anchor_in_root_view, |
| const blink::WebString& main_text, |
| + blink::WebTextDirection main_text_hint, |
| const blink::WebString& sub_text, |
| - blink::WebTextDirection hint) { |
| + blink::WebTextDirection sub_text_hint) { |
| base::string16 wrapped_main_text = main_text; |
| base::string16 wrapped_sub_text = sub_text; |
| - if (hint == blink::WebTextDirectionLeftToRight) { |
| + if (main_text_hint == blink::WebTextDirectionLeftToRight) { |
| wrapped_main_text = |
| - base::i18n::GetDisplayStringInLTRDirectionality(wrapped_main_text); |
| - if (!wrapped_sub_text.empty()) { |
| + base::i18n::GetDisplayStringInLTRDirectionality(wrapped_main_text); |
| + } else if (main_text_hint == blink::WebTextDirectionRightToLeft |
| + && !base::i18n::IsRTL()) { |
|
jam
2014/08/21 17:32:51
nit: indent 4 more here. also put "&&" at the star
Habib Virji
2014/08/26 08:55:44
Done.
|
| + base::i18n::WrapStringWithRTLFormatting(&wrapped_main_text); |
|
jam
2014/08/21 17:32:51
this should be a 2 space indent from the brace bra
Habib Virji
2014/08/26 08:55:44
Done.
|
| + } |
| + |
| + if (!wrapped_sub_text.empty()) { |
| + if (sub_text_hint == blink::WebTextDirectionLeftToRight) { |
| wrapped_sub_text = |
| - base::i18n::GetDisplayStringInLTRDirectionality(wrapped_sub_text); |
| - } |
| - } else if (hint == blink::WebTextDirectionRightToLeft |
| - && !base::i18n::IsRTL()) { |
| - base::i18n::WrapStringWithRTLFormatting(&wrapped_main_text); |
| - if (!wrapped_sub_text.empty()) { |
| + base::i18n::GetDisplayStringInLTRDirectionality(wrapped_sub_text); |
|
jam
2014/08/21 17:32:51
4 space indent from wrapped and not 2
Habib Virji
2014/08/26 08:55:44
Done.
|
| + } else if (sub_text_hint == blink::WebTextDirectionRightToLeft) { |
| base::i18n::WrapStringWithRTLFormatting(&wrapped_sub_text); |
| } |
| } |