LayoutTests:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2006 06:33:48 +0000 (06:33 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2006 06:33:48 +0000 (06:33 +0000)
        Reviewed by Anders.

        - Test for http://bugs.webkit.org/show_bug.cgi?id=11172
          REGRESSION (NativeListBox): OPTION text paints over the edge of the select element at http://jobs.apple.com/

        * fast/forms/listbox-width-change-expected.txt: Added.
        * fast/forms/listbox-width-change-expected.png: Added.
        * fast/forms/listbox-width-change-expected.checksum: Added.
        * fast/forms/listbox-width-change.html: Added.

WebCore:

        Reviewed by Anders.

        - Fix for http://bugs.webkit.org/show_bug.cgi?id=11172
          REGRESSION (NativeListBox): OPTION text paints over the edge of the select element at http://jobs.apple.com/

         Test: fast/forms/listbox-width-change.html

        * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement):
          When the options change, call setNeedsLayoutAndMinMaxRecalc.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17026 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/forms/listbox-width-change-expected.checksum [new file with mode: 0644]
LayoutTests/fast/forms/listbox-width-change-expected.png [new file with mode: 0644]
LayoutTests/fast/forms/listbox-width-change-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/listbox-width-change.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderListBox.cpp

index ad14c7c549ee14f87ff0cfec5be7b1c4a8e6c8ee..84b4151189480f0ea0fdfd4284bbd8b2dc7f8300 100644 (file)
@@ -1,3 +1,15 @@
+2006-10-12  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Anders.
+
+        - Test for http://bugs.webkit.org/show_bug.cgi?id=11172
+          REGRESSION (NativeListBox): OPTION text paints over the edge of the select element at http://jobs.apple.com/
+
+        * fast/forms/listbox-width-change-expected.txt: Added.
+        * fast/forms/listbox-width-change-expected.png: Added.
+        * fast/forms/listbox-width-change-expected.checksum: Added.
+        * fast/forms/listbox-width-change.html: Added.
+
 2006-10-11  Kevin McCullough  <KMcCullough@apple.com>
 
         Reviewed by Darin.
diff --git a/LayoutTests/fast/forms/listbox-width-change-expected.checksum b/LayoutTests/fast/forms/listbox-width-change-expected.checksum
new file mode 100644 (file)
index 0000000..bfc9f9b
--- /dev/null
@@ -0,0 +1 @@
+aa56fa2fd143bd536e2616a4c5fee276
\ No newline at end of file
diff --git a/LayoutTests/fast/forms/listbox-width-change-expected.png b/LayoutTests/fast/forms/listbox-width-change-expected.png
new file mode 100644 (file)
index 0000000..762a780
Binary files /dev/null and b/LayoutTests/fast/forms/listbox-width-change-expected.png differ
diff --git a/LayoutTests/fast/forms/listbox-width-change-expected.txt b/LayoutTests/fast/forms/listbox-width-change-expected.txt
new file mode 100644 (file)
index 0000000..c083066
--- /dev/null
@@ -0,0 +1,12 @@
+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
+      RenderText {#text} at (0,0) size 650x18
+        text run at (0,0) width 650: "This tests that when a list box's options get updated, the list box will recalculate its width, and relayout. "
+      RenderBR {BR} at (0,0) size 0x0
+      RenderListBox {SELECT} at (2,20) size 197x58 [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
diff --git a/LayoutTests/fast/forms/listbox-width-change.html b/LayoutTests/fast/forms/listbox-width-change.html
new file mode 100644 (file)
index 0000000..a0ce2f4
--- /dev/null
@@ -0,0 +1,21 @@
+<html>
+    <head>
+        <script>
+            function test() {
+                if (window.layoutTestController)
+                    layoutTestController.waitUntilDone();
+                setTimeout("test2()", 100);
+            }
+            function test2() {
+                document.getElementById('sl').options[0] = new Option ( "This text should fit in the list box", "1" );
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+            }
+        </script>
+    </head>
+    <body onload="test()">
+        This tests that when a list box's options get updated, the list box will recalculate its width, and relayout.
+        <br>
+        <select id="sl" multiple></select>
+    </body>
+</html>
index a2fc0fcb2e122f6ee79c5d645eca34419ca2abd0..f8490643e5b266de7d32caf711fcd491aaccf990 100644 (file)
@@ -1,3 +1,15 @@
+2006-10-12  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Anders.
+
+        - Fix for http://bugs.webkit.org/show_bug.cgi?id=11172
+          REGRESSION (NativeListBox): OPTION text paints over the edge of the select element at http://jobs.apple.com/
+        
+         Test: fast/forms/listbox-width-change.html
+
+        * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement):
+          When the options change, call setNeedsLayoutAndMinMaxRecalc.
+
 2006-10-12  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Oliver.
index 6c18532e32a605ef697193bf6bf956fa47af173f..d24d5253b53f25e64e44329ed6a09ea6d06c7ad0 100644 (file)
@@ -104,6 +104,7 @@ void RenderListBox::updateFromElement()
         }
         m_optionsWidth = static_cast<int>(ceilf(width));
         m_optionsChanged = false;
+        setNeedsLayoutAndMinMaxRecalc();
     }
 }