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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 325563002: Ensure minimum baseline and height values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.cc
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index bd99f5edb6ed34b9b5a1d27bb3d09d783a52b3ae..d87ef8acedf72c38f9415fd9468f1f4606826221 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -457,7 +457,7 @@ RenderTextHarfBuzz::~RenderTextHarfBuzz() {}
Size RenderTextHarfBuzz::GetStringSize() {
EnsureLayout();
- return Size(lines()[0].size.width(), font_list().GetHeight());
+ return lines()[0].size;
}
SelectionModel RenderTextHarfBuzz::FindCursorPosition(const Point& point) {
@@ -702,6 +702,8 @@ void RenderTextHarfBuzz::EnsureLayout() {
if (lines().empty()) {
std::vector<internal::Line> lines;
lines.push_back(internal::Line());
+ lines[0].baseline = font_list().GetBaseline();
+ lines[0].size.set_height(font_list().GetHeight());
int current_x = 0;
SkPaint paint;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698