Index: chrome/browser/ui/views/page_info_bubble_view.cc |
diff --git a/chrome/browser/ui/views/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info_bubble_view.cc |
index 02fb812fb97745a850f318caeedc77d7cdba924b..af45e6721a1cd8e3670d34d7f8089bef13053f47 100644 |
--- a/chrome/browser/ui/views/page_info_bubble_view.cc |
+++ b/chrome/browser/ui/views/page_info_bubble_view.cc |
@@ -20,6 +20,7 @@ |
#include "grit/locale_settings.h" |
#include "net/base/x509_certificate.h" |
#include "ui/base/l10n/l10n_util.h" |
+#include "ui/base/range/range.h" |
#include "ui/gfx/canvas.h" |
#include "ui/gfx/image/image.h" |
#include "ui/views/controls/image_view.h" |
@@ -424,6 +425,12 @@ gfx::Size Section::LayoutItems(bool compute_bounds_only, int width) { |
if (!compute_bounds_only) |
headline_label_->SetBounds(x, y, w > 0 ? w : 0, size.height()); |
y += size.height(); |
+ |
+ // Show the leading headline text by moving the textfield cursor there, |
+ // otherwise long headlines may initially show the leading text truncated. |
+ // This can only be done after the textfield is initialized with the Widget. |
+ if (GetWidget()) |
+ headline_label_->SelectRange(ui::Range()); |
Peter Kasting
2012/08/03 19:20:37
I don't think this is the right fix. Instead, the
msw
2012/08/03 20:10:19
This fixes the regression and brings us to parity
|
} else { |
if (!compute_bounds_only) |
headline_label_->SetBounds(x, y, 0, 0); |