LayoutTests:
Reviewed by Hyatt.
Test for: <rdar://problem/4963411> Items of SELECT element are incorrectly highlighted when display:block is set
* fast/forms/select-block-background-expected.checksum: Added.
* fast/forms/select-block-background-expected.png: Added.
* fast/forms/select-block-background-expected.txt: Added.
* fast/forms/select-block-background.html: Added.
WebCore:
Reviewed by Hyatt.
Fix for <rdar://problem/4963411> Items of SELECT element are incorrectly highlighted when display:block is set
Test: fast/forms/select-block-background.html
* rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject):
Paint the item backgrounds during the PaintPhaseChildBlockBackground or PaintPhaseChildBlockBackgrounds phase.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/forms/select-block-background-expected.checksum b/LayoutTests/fast/forms/select-block-background-expected.checksum
new file mode 100644
index 0000000..0b15fcb2
--- /dev/null
+++ b/LayoutTests/fast/forms/select-block-background-expected.checksum
@@ -0,0 +1 @@
+ecfc850b2bcc5e25bc1e8310c4eb8cbd
\ No newline at end of file
diff --git a/LayoutTests/fast/forms/select-block-background-expected.png b/LayoutTests/fast/forms/select-block-background-expected.png
new file mode 100644
index 0000000..ecbbbd5
--- /dev/null
+++ b/LayoutTests/fast/forms/select-block-background-expected.png
Binary files differ
diff --git a/LayoutTests/fast/forms/select-block-background-expected.txt b/LayoutTests/fast/forms/select-block-background-expected.txt
new file mode 100644
index 0000000..9380ce5
--- /dev/null
+++ b/LayoutTests/fast/forms/select-block-background-expected.txt
@@ -0,0 +1,10 @@
+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 (anonymous) at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 539x18
+ text run at (0,0) width 539: "This tests that backgrounds for list box items draw correctly when a list box is a block"
+ RenderBR {BR} at (539,14) size 0x0
+ RenderListBox {SELECT} at (2,20) size 48x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
diff --git a/LayoutTests/fast/forms/select-block-background.html b/LayoutTests/fast/forms/select-block-background.html
new file mode 100644
index 0000000..d978938
--- /dev/null
+++ b/LayoutTests/fast/forms/select-block-background.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ This tests that backgrounds for list box items draw correctly when a list box is a block<br>
+ <select style="display: block;" multiple>
+ <option selected>Item1</option>
+ </select>
+ </body>
+</html>