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

Unified Diff: ui/gfx/text_elider.h

Issue 614103007: Error in popup on Link (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review Created 6 years, 2 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
Index: ui/gfx/text_elider.h
diff --git a/ui/gfx/text_elider.h b/ui/gfx/text_elider.h
index 9d77afa04f01f2437d1ce579cf4a65331c00f71d..0ff6a76eb071445ddffdd9d1d18fd4068b8bf3b1 100644
--- a/ui/gfx/text_elider.h
+++ b/ui/gfx/text_elider.h
@@ -144,13 +144,16 @@ enum ReformattingResultFlags {
// single line, the wrapping behavior can be specified with the |wrap_behavior|
// param. Returns a combination of |ReformattingResultFlags| that indicate
// whether the given rectangle had insufficient space to accommodate |text|,
-// leading to elision or truncation (and not just reformatting).
+// leading to elision or truncation (and not just reformatting). In case
+// |max_broken_pixel_width| is not NULL it will store maximum width of those
+// lines which were broken after some words to fit |available_pixel_width|.
GFX_EXPORT int ElideRectangleText(const base::string16& text,
const gfx::FontList& font_list,
float available_pixel_width,
int available_pixel_height,
WordWrapBehavior wrap_behavior,
- std::vector<base::string16>* lines);
+ std::vector<base::string16>* lines,
+ float* max_broken_pixel_width);
// Truncates |string| to |length| characters. This breaks the string according
// to the specified |break_type|, which must be either WORD_BREAK or

Powered by Google App Engine
This is Rietveld 408576698