<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[19998] trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/19998">19998</a></dd>
<dt>Author</dt> <dd>bdash</dd>
<dt>Date</dt> <dd>2007-03-06 19:40:57 -0800 (Tue, 06 Mar 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>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 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.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorehtmlHTMLSelectElementcpp">trunk/WebCore/html/HTMLSelectElement.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformsselectchangelistboxsizeexpectedchecksum">trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.checksum</a></li>
<li><a href="#trunkLayoutTestsfastformsselectchangelistboxsizeexpectedpng">trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.png</a></li>
<li><a href="#trunkLayoutTestsfastformsselectchangelistboxsizeexpectedtxt">trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsselectchangelistboxsizehtml">trunk/LayoutTests/fast/forms/select-change-listbox-size.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (19997 => 19998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-03-07 03:35:03 UTC (rev 19997)
+++ trunk/LayoutTests/ChangeLog        2007-03-07 03:40:57 UTC (rev 19998)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2007-03-06 Mitz Pettel <mitz@webkit.org>
</span><span class="cx">
</span><ins>+ 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>
+
</ins><span class="cx"> Reviewed by Dave Hyatt.
</span><span class="cx">
</span><span class="cx"> - repaint tests and updated result for http://bugs.webkit.org/show_bug.cgi?id=12885
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsselectchangelistboxsizeexpectedchecksum"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.checksum (0 => 19998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.checksum         (rev 0)
+++ trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.checksum        2007-03-07 03:40:57 UTC (rev 19998)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+f3c816b9af45994ead4a6fdbf540dc4a
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsselectchangelistboxsizeexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.png
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx"> + application/octet-stream
</span><a id="trunkLayoutTestsfastformsselectchangelistboxsizeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.txt (0 => 19998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/forms/select-change-listbox-size-expected.txt        2007-03-07 03:40:57 UTC (rev 19998)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+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
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformsselectchangelistboxsizehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/select-change-listbox-size.html (0 => 19998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/select-change-listbox-size.html         (rev 0)
+++ trunk/LayoutTests/fast/forms/select-change-listbox-size.html        2007-03-07 03:40:57 UTC (rev 19998)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+<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>
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (19997 => 19998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-03-07 03:35:03 UTC (rev 19997)
+++ trunk/WebCore/ChangeLog        2007-03-07 03:40:57 UTC (rev 19998)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2007-03-06 Mitz Pettel <mitz@webkit.org>
</span><span class="cx">
</span><ins>+ 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>
+
</ins><span class="cx"> Reviewed by Dave Hyatt.
</span><span class="cx">
</span><span class="cx"> - fix http://bugs.webkit.org/show_bug.cgi?id=12885
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLSelectElement.cpp (19997 => 19998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLSelectElement.cpp        2007-03-07 03:35:03 UTC (rev 19997)
+++ trunk/WebCore/html/HTMLSelectElement.cpp        2007-03-07 03:40:57 UTC (rev 19998)
</span><span class="lines">@@ -344,6 +344,7 @@
</span><span class="cx"> {
</span><span class="cx"> bool oldUsesMenuList = usesMenuList();
</span><span class="cx"> if (attr->name() == sizeAttr) {
</span><ins>+ int oldSize = m_size;
</ins><span class="cx"> // Set the attribute value to a number.
</span><span class="cx"> // This is important since the style rules for this attribute can determine the appearance property.
</span><span class="cx"> int size = attr->value().toInt();
</span><span class="lines">@@ -352,7 +353,7 @@
</span><span class="cx"> attr->setValue(attrSize);
</span><span class="cx">
</span><span class="cx"> m_size = max(size, 1);
</span><del>- if (oldUsesMenuList != usesMenuList() && attached()) {
</del><ins>+ if ((oldUsesMenuList != usesMenuList() || !oldUsesMenuList && m_size != oldSize) && attached()) {
</ins><span class="cx"> detach();
</span><span class="cx"> attach();
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>