Commit bba8a7c8 authored by Nina Satragno's avatar Nina Satragno Committed by Commit Bot

Allow breaking on characters to wrap webauthn dialog title.

This prevents a minor security issue where the hostname of the RP
would have its tail end cut.

Bug: 893258
Change-Id: Ib227f6be8f274a2ddf78917597c217807bba01ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1579459
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: default avatarKim Paulhamus <kpaulhamus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653406}
parent 90d9fe21
...@@ -159,6 +159,7 @@ AuthenticatorRequestSheetView::CreateContentsBelowIllustration() { ...@@ -159,6 +159,7 @@ AuthenticatorRequestSheetView::CreateContentsBelowIllustration() {
views::style::STYLE_PRIMARY); views::style::STYLE_PRIMARY);
title_label->SetMultiLine(true); title_label->SetMultiLine(true);
title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
title_label->SetAllowCharacterBreak(true);
label_container->AddChildView(title_label.release()); label_container->AddChildView(title_label.release());
auto description_label = std::make_unique<views::Label>( auto description_label = std::make_unique<views::Label>(
...@@ -166,6 +167,7 @@ AuthenticatorRequestSheetView::CreateContentsBelowIllustration() { ...@@ -166,6 +167,7 @@ AuthenticatorRequestSheetView::CreateContentsBelowIllustration() {
views::style::CONTEXT_MESSAGE_BOX_BODY_TEXT); views::style::CONTEXT_MESSAGE_BOX_BODY_TEXT);
description_label->SetMultiLine(true); description_label->SetMultiLine(true);
description_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); description_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
description_label->SetAllowCharacterBreak(true);
label_container->AddChildView(description_label.release()); label_container->AddChildView(description_label.release());
base::Optional<base::string16> additional_desciption = base::Optional<base::string16> additional_desciption =
...@@ -176,6 +178,7 @@ AuthenticatorRequestSheetView::CreateContentsBelowIllustration() { ...@@ -176,6 +178,7 @@ AuthenticatorRequestSheetView::CreateContentsBelowIllustration() {
views::style::CONTEXT_MESSAGE_BOX_BODY_TEXT); views::style::CONTEXT_MESSAGE_BOX_BODY_TEXT);
label->SetMultiLine(true); label->SetMultiLine(true);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT); label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
label->SetAllowCharacterBreak(true);
label_container->AddChildView(label.release()); label_container->AddChildView(label.release());
} }
......
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