Commit d9d6db5a authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Fix obvious copy and paste fail.

Bug: 1131842
Change-Id: I0612adf1075e417bcb43cd24b69b19b96be6b7c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429785
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810433}
parent e3b36a4f
......@@ -2509,8 +2509,8 @@ int Textfield::CharsToDips(int width_in_chars) const {
// effects like find boxes on different tabs being 1 DIP different width.
const int cursor_width =
(!GetReadOnly() && GetRenderText()->cursor_enabled()) ? 1 : 0;
return GetFontList().GetExpectedTextWidth(default_width_in_chars_) +
cursor_width + GetInsets().width();
return GetFontList().GetExpectedTextWidth(width_in_chars) + cursor_width +
GetInsets().width();
}
bool Textfield::ShouldBlinkCursor() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment