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

Unified Diff: views/controls/textfield/textfield.cc

Issue 7027014: Remove unused multiline attribute in textfield (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for merge Created 9 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
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield.cc
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index c2bc1288fedce19c2eb80cf796579fbb8bef72fb..6f2edd5ebd6fd90cd77365a59b0d0d7dcc26954a 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -51,7 +51,6 @@ Textfield::Textfield()
use_default_text_color_(true),
background_color_(SK_ColorWHITE),
use_default_background_color_(true),
- num_lines_(1),
initialized_(false),
horizontal_margins_were_set_(false),
vertical_margins_were_set_(false) {
@@ -69,7 +68,6 @@ Textfield::Textfield(StyleFlags style)
use_default_text_color_(true),
background_color_(SK_ColorWHITE),
use_default_background_color_(true),
- num_lines_(1),
initialized_(false),
horizontal_margins_were_set_(false),
vertical_margins_were_set_(false) {
@@ -109,10 +107,6 @@ void Textfield::SetPassword(bool password) {
native_wrapper_->UpdateIsPassword();
}
-bool Textfield::IsMultiLine() const {
- return !!(style_ & STYLE_MULTILINE);
-}
-
void Textfield::SetText(const string16& text) {
text_ = text;
if (native_wrapper_)
@@ -197,12 +191,6 @@ void Textfield::SetVerticalMargins(int top, int bottom) {
PreferredSizeChanged();
}
-void Textfield::SetHeightInLines(int num_lines) {
- DCHECK(IsMultiLine());
- num_lines_ = num_lines;
- PreferredSizeChanged();
-}
-
void Textfield::RemoveBorder() {
if (!draw_border_)
return;
@@ -313,8 +301,7 @@ gfx::Size Textfield::GetPreferredSize() {
if (draw_border_ && native_wrapper_)
insets = native_wrapper_->CalculateInsets();
return gfx::Size(font_.GetExpectedTextWidth(default_width_in_chars_) +
- insets.width(),
- num_lines_ * font_.GetHeight() + insets.height());
+ insets.width(), font_.GetHeight() + insets.height());
}
bool Textfield::IsFocusable() const {
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698