Changeset 25562 in webkit
- Timestamp:
- Sep 14, 2007 8:38:58 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r25547 r25562 1 2007-09-14 Darin Adler <darin@apple.com> 2 3 Reviewed by Mitz and Kevin Decker. 4 5 - test for http://bugs.webkit.org/show_bug.cgi?id=15197 6 <rdar://problem/5478271> REGRESSION: Some Yahoo text entry fields 7 render as lines rather than text entry boxes 8 9 * fast/forms/textarea-rows-cols.html: Added. 10 * platform/mac/fast/forms/textarea-rows-cols-expected.checksum: Added. 11 * platform/mac/fast/forms/textarea-rows-cols-expected.png: Added. 12 * platform/mac/fast/forms/textarea-rows-cols-expected.txt: Added. 13 1 14 2007-09-13 Darin Adler <darin@apple.com> 2 15 -
trunk/WebCore/ChangeLog
r25561 r25562 1 2007-09-14 Darin Adler <darin@apple.com> 2 3 Reviewed by Mitz and Kevin Decker. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=15197 6 <rdar://problem/5478271> REGRESSION: Some Yahoo text entry fields 7 render as lines rather than text entry boxes 8 9 Test: fast/forms/textarea-rows-cols.html 10 11 * html/HTMLTextAreaElement.cpp: 12 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Use constants for the default number 13 of rows and columns. 14 (WebCore::HTMLTextAreaElement::parseMappedAttribute): If rows/cols attribute has a value 15 that's missing, non-numeric, or zero, then use the default value. Also check for the 16 case where the effective value of the attribute isn't changing. 17 1 18 2007-09-14 Sven Herzberg <sven@imendio.com> 2 19 -
trunk/WebCore/html/HTMLTextAreaElement.cpp
r25345 r25562 45 45 using namespace HTMLNames; 46 46 47 HTMLTextAreaElement::HTMLTextAreaElement(Document *doc, HTMLFormElement *f) 47 static const int defaultRows = 2; 48 static const int defaultCols = 20; 49 50 HTMLTextAreaElement::HTMLTextAreaElement(Document* doc, HTMLFormElement* f) 48 51 : HTMLFormControlElementWithState(textareaTag, doc, f) 49 , m_rows( 2)50 , m_cols( 20)52 , m_rows(defaultRows) 53 , m_cols(defaultCols) 51 54 , m_wrap(ta_Virtual) 52 55 , cachedSelStart(-1) … … 125 128 { 126 129 if (attr->name() == rowsAttr) { 127 m_rows = !attr->isNull() ? attr->value().toInt() : 3; 128 if (renderer()) 129 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 130 int rows = attr->value().toInt(); 131 if (rows <= 0) 132 rows = defaultRows; 133 if (m_rows != rows) { 134 m_rows = rows; 135 if (renderer()) 136 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 137 } 130 138 } else if (attr->name() == colsAttr) { 131 m_cols = !attr->isNull() ? attr->value().toInt() : 60; 132 if (renderer()) 133 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 139 int cols = attr->value().toInt(); 140 if (cols <= 0) 141 cols = defaultCols; 142 if (m_cols != cols) { 143 m_cols = cols; 144 if (renderer()) 145 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 146 } 134 147 } else if (attr->name() == wrapAttr) { 135 148 // virtual / physical is Netscape extension of HTML 3.0, now deprecated
Note: See TracChangeset
for help on using the changeset viewer.