+2007-03-06 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Adele.
+
+ - test for http://bugs.webkit.org/show_bug.cgi?id=12986
+ REGRESSION(NativeListBox): Listboxes not updated when resized dynamically
+
+ * fast/forms/select-change-listbox-size-expected.checksum: Added.
+ * fast/forms/select-change-listbox-size-expected.png: Added.
+ * fast/forms/select-change-listbox-size-expected.txt: Added.
+ * fast/forms/select-change-listbox-size.html: Added.
+
2007-03-06 Mitz Pettel <mitz@webkit.org>
Reviewed by Dave Hyatt.
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 53x18
+ text run at (0,0) width 53: "Test for "
+ RenderInline {I} at (0,0) size 738x36
+ RenderInline {A} at (0,0) size 301x18 [color=#0000EE]
+ RenderText {#text} at (53,0) size 301x18
+ text run at (53,0) width 301: "http://bugs.webkit.org/show_bug.cgi?id=12986"
+ RenderText {#text} at (354,0) size 738x36
+ text run at (354,0) width 4: " "
+ text run at (358,0) width 380: "REGRESSION(NativeListBox): Listboxes not updated when"
+ text run at (0,18) width 125: "resized dynamically"
+ RenderText {#text} at (125,18) size 4x18
+ text run at (125,18) width 4: "."
+ RenderBlock {P} at (0,52) size 784x18
+ RenderText {#text} at (0,0) size 316x18
+ text run at (0,0) width 316: "This list box should be tall enough to fit 6 options."
+ RenderBlock (anonymous) at (0,86) size 784x89
+ RenderListBox {SELECT} at (2,2) size 48x85 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
--- /dev/null
+<html>
+<head>
+ <title></title>
+</head>
+<body>
+ <p>
+ Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=12986">http://bugs.webkit.org/show_bug.cgi?id=12986</a>
+ REGRESSION(NativeListBox): Listboxes not updated when resized dynamically</i>.
+ </p>
+ <p>
+ This list box should be tall enough to fit 6 options.
+ </p>
+ <select id="target" size="4">
+ <option>One</option>
+ <option>Two</option>
+ <option>Three</option>
+ <option>Four</option>
+ <option>Five</option>
+ <option>Six</option>
+ </select>
+ <script>
+ document.body.offsetTop;
+ document.getElementById("target").size = 6;
+ </script>
+</body>
+</html>
+2007-03-06 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Adele.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=12986
+ REGRESSION(NativeListBox): Listboxes not updated when resized dynamically
+
+ Test: fast/forms/select-change-listbox-size.html
+
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::parseMappedAttribute): Reattach on list box size change.
+
2007-03-06 Mitz Pettel <mitz@webkit.org>
Reviewed by Dave Hyatt.
{
bool oldUsesMenuList = usesMenuList();
if (attr->name() == sizeAttr) {
+ int oldSize = m_size;
// Set the attribute value to a number.
// This is important since the style rules for this attribute can determine the appearance property.
int size = attr->value().toInt();
attr->setValue(attrSize);
m_size = max(size, 1);
- if (oldUsesMenuList != usesMenuList() && attached()) {
+ if ((oldUsesMenuList != usesMenuList() || !oldUsesMenuList && m_size != oldSize) && attached()) {
detach();
attach();
}