Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4391)

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_bubble.cc

Issue 11535014: Replace StyleRange with BreakList; update RenderText, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/extension_installed_bubble.cc
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index 1eafde8b164f0c68c20224305e9a47a79d47cd1a..4ad0ac83520dcfe09fc60d771eddd5b742153197 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -369,23 +369,15 @@ class InstalledBubbleContent : public views::View,
line->GetStringSize().height());
line->SetDisplayRect(gfx::Rect(position, size));
position.set_y(position.y() + size.height());
-
- // The link is always first in the text and is assumed to not be long
- // enough to wrap to the next line.
- if (it == lines.begin()) {
- // First line we treat specially, because we will draw the link on its
- // own, so we don't want to draw the text for the link twice. We
- // therefore set it to transparent.
- gfx::StyleRange link_text_style(line->default_style());
- link_text_style.foreground = SK_ColorTRANSPARENT;
- link_text_style.range = ui::Range(0, signin_promo_link_text_.size());
- line->ApplyStyleRange(link_text_style);
- }
-
sign_in_promo_lines_.push_back(line);
height += size.height();
}
+ // The link is drawn separately; make it transparent here to only draw once.
+ // The link always leads other text and is assumed to fit on the first line.
+ sign_in_promo_lines_.front()->ApplyColor(SK_ColorTRANSPARENT,
+ ui::Range(0, signin_promo_link_text_.size()));
+
return height;
}
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698