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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 1953133002: [WIP: not for review] Reduce re-layout Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/render_text_harfbuzz.cc
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index 47d55ee97f0fbbc69368ecda7910e71b3df2e6ff..f33a5ed7a43cbd5f134d03fcf309f23cb2a214bb 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -782,11 +782,9 @@ bool RenderTextHarfBuzz::MultilineSupported() const {
}
const base::string16& RenderTextHarfBuzz::GetDisplayText() {
- // TODO(oshima): Consider supporting eliding multi-line text.
- // This requires max_line support first.
- if (multiline() ||
- elide_behavior() == NO_ELIDE ||
- elide_behavior() == FADE_TAIL) {
+ // TODO(krb): Consider other elision modes for multiline.
+ if ((multiline() && (max_lines() == 0 || elide_behavior() != ELIDE_TAIL)) ||
+ elide_behavior() == NO_ELIDE || elide_behavior() == FADE_TAIL) {
// Call UpdateDisplayText to clear |display_text_| and |text_elided_|
// on the RenderText class.
UpdateDisplayText(0);

Powered by Google App Engine
This is Rietveld 408576698