[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mrobinson at webkit.org mrobinson at webkit.org
Wed Dec 22 14:53:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 8785917dc21d82e6b4dd69e0c107b34b6426dc63
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 23 15:29:38 2010 +0000

    2010-10-23  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] Menu list buttons do react properly to CSS styling
            https://bugs.webkit.org/show_bug.cgi?id=48099
    
            Rebaseline menu list button tests and add pixel results. There
            are still issues with padding around separators, but these will
            be fixed in a further patch.
    
            * platform/gtk/editing/selection/select-box-expected.txt:
            * platform/gtk/fast/forms/menulist-clip-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-clip-expected.png: Added.
            * platform/gtk/fast/forms/menulist-clip-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-deselect-update-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-deselect-update-expected.png: Added.
            * platform/gtk/fast/forms/menulist-deselect-update-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-narrow-width-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-narrow-width-expected.png: Added.
            * platform/gtk/fast/forms/menulist-narrow-width-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-no-overflow-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-no-overflow-expected.png: Added.
            * platform/gtk/fast/forms/menulist-no-overflow-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-option-wrap-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-option-wrap-expected.png: Added.
            * platform/gtk/fast/forms/menulist-option-wrap-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-restrict-line-height-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-restrict-line-height-expected.png: Added.
            * platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-separator-painting-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-separator-painting-expected.png: Added.
            * platform/gtk/fast/forms/menulist-separator-painting-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-style-color-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-style-color-expected.png: Added.
            * platform/gtk/fast/forms/menulist-style-color-expected.txt: Added.
            * platform/gtk/fast/forms/menulist-width-change-expected.checksum: Added.
            * platform/gtk/fast/forms/menulist-width-change-expected.png: Added.
            * platform/gtk/fast/forms/menulist-width-change-expected.txt: Added.
    2010-10-23  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] Menu list buttons do react properly to CSS styling
            https://bugs.webkit.org/show_bug.cgi?id=48099
    
            Correct the way that menu list buttons get their necessary padding from
            GTK+. Instead of resetting the padding to these values, return them via
            the popupInternalPadding* methods. Add implementations for *MenuListButton*
            methods.
    
            * platform/gtk/RenderThemeGtk.cpp:
            (WebCore::getComboBoxPadding): Added.
            (WebCore::RenderThemeGtk::popupInternalPaddingLeft): Added.
            (WebCore::RenderThemeGtk::popupInternalPaddingRight): Added.
            (WebCore::RenderThemeGtk::popupInternalPaddingTop): Added.
            (WebCore::RenderThemeGtk::popupInternalPaddingBottom): Added.
            (WebCore::RenderThemeGtk::adjustMenuListStyle): Do not reset CSS
            properties, instead rely on the poupInternalPadding* methods.
            (WebCore::RenderThemeGtk::adjustMenuListButtonStyle): Added.
            (WebCore::RenderThemeGtk::paintMenuListButton): Added.
            * platform/gtk/RenderThemeGtk.h: Added new method declarations.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70391 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7925fb8..70baedc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,43 @@
+2010-10-23  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Menu list buttons do react properly to CSS styling
+        https://bugs.webkit.org/show_bug.cgi?id=48099
+
+        Rebaseline menu list button tests and add pixel results. There
+        are still issues with padding around separators, but these will
+        be fixed in a further patch.
+
+        * platform/gtk/editing/selection/select-box-expected.txt:
+        * platform/gtk/fast/forms/menulist-clip-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-clip-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-clip-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-deselect-update-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-deselect-update-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-deselect-update-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-narrow-width-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-narrow-width-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-narrow-width-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-no-overflow-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-no-overflow-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-no-overflow-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-option-wrap-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-option-wrap-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-option-wrap-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-restrict-line-height-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-restrict-line-height-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-separator-painting-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-separator-painting-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-separator-painting-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-style-color-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-style-color-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-style-color-expected.txt: Added.
+        * platform/gtk/fast/forms/menulist-width-change-expected.checksum: Added.
+        * platform/gtk/fast/forms/menulist-width-change-expected.png: Added.
+        * platform/gtk/fast/forms/menulist-width-change-expected.txt: Added.
+
 2010-10-23  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r70367.
diff --git a/LayoutTests/platform/gtk/editing/selection/select-box-expected.txt b/LayoutTests/platform/gtk/editing/selection/select-box-expected.txt
index f0109bd..28847c0 100644
--- a/LayoutTests/platform/gtk/editing/selection/select-box-expected.txt
+++ b/LayoutTests/platform/gtk/editing/selection/select-box-expected.txt
@@ -11,10 +11,10 @@ layer at (0,0) size 800x600
         RenderBlock {DIV} at (0,0) size 784x29
           RenderText {#text} at (0,5) size 68x19
             text run at (0,5) width 68: "select box: "
-          RenderMenuList {SELECT} at (70,2) size 32x25 [bgcolor=#FFFFFF]
-            RenderBlock (anonymous) at (3,3) size 9x19
-              RenderText at (0,0) size 9x19
-                text run at (0,0) width 9: "1"
+          RenderMenuList {SELECT} at (70,2) size 32x25 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+            RenderBlock (anonymous) at (1,1) size 30x23
+              RenderText at (2,2) size 9x19
+                text run at (2,2) width 9: "1"
           RenderText {#text} at (104,5) size 64x19
             text run at (104,5) width 64: " the end ..."
 caret: position 1 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.checksum
new file mode 100644
index 0000000..caf8d17
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.checksum
@@ -0,0 +1 @@
+a35015f51ad1d403bdc3c297e8b950c9
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.png
new file mode 100644
index 0000000..122105c
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.txt
new file mode 100644
index 0000000..c09995f
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-clip-expected.txt
@@ -0,0 +1,24 @@
+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 784x38
+        RenderText {#text} at (0,0) size 111x19
+          text run at (0,0) width 111: "Rendering test for "
+        RenderInline {I} at (0,0) size 765x38
+          RenderInline {A} at (0,0) size 305x19 [color=#0000EE]
+            RenderText {#text} at (111,0) size 305x19
+              text run at (111,0) width 305: "http://bugs.webkit.org/show_bug.cgi?id=15156"
+          RenderText {#text} at (416,0) size 765x38
+            text run at (416,0) width 4: " "
+            text run at (420,0) width 345: "REGRESSION (r24594-r24668): The bottom of styled"
+            text run at (0,19) width 222: "<select> button text is clipped out"
+        RenderText {#text} at (222,19) size 4x19
+          text run at (222,19) width 4: "."
+      RenderBlock (anonymous) at (0,54) size 784x30
+        RenderMenuList {SELECT} at (2,0) size 47x30 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+          RenderBlock (anonymous) at (1,4) size 45x21
+            RenderText at (0,0) size 45x21
+              text run at (0,0) width 45: "Apple"
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.checksum
new file mode 100644
index 0000000..6b8d97d
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.checksum
@@ -0,0 +1 @@
+242ed87e221ff1bf8736004d2412e65e
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.png
new file mode 100644
index 0000000..d99cf68
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.txt
new file mode 100644
index 0000000..80b619e
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-deselect-update-expected.txt
@@ -0,0 +1,13 @@
+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,5) size 69x19
+        text run at (0,5) width 69: "Test result: "
+      RenderMenuList {SELECT} at (71,2) size 67x25 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+        RenderBlock (anonymous) at (1,1) size 65x23
+          RenderText at (2,2) size 44x19
+            text run at (2,2) width 44: "PASS"
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.checksum
new file mode 100644
index 0000000..fcd2c15
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.checksum
@@ -0,0 +1 @@
+7651a19e11d3c5e7785596d2d6c5b526
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.png
new file mode 100644
index 0000000..10012b1
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.txt
new file mode 100644
index 0000000..0f2b2cf
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-narrow-width-expected.txt
@@ -0,0 +1,18 @@
+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 479x19
+        text run at (0,0) width 479: "This tests that select elements with a narrow width (1px) are rendered correctly."
+      RenderBR {BR} at (479,15) size 0x0
+      RenderMenuList {SELECT} at (0,21) size 2x25 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+        RenderBlock (anonymous) at (1,1) size 21x23
+          RenderText at (2,2) size 25x19
+            text run at (2,2) width 25: "test"
+      RenderBR {BR} at (2,39) size 0x0
+      RenderMenuList {SELECT} at (0,50) size 2x25 [bgcolor=#0000FF] [border: (1px solid #000000)]
+        RenderBlock (anonymous) at (1,1) size 21x23
+          RenderText at (2,2) size 25x19
+            text run at (2,2) width 25: "test"
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.checksum
new file mode 100644
index 0000000..ff416d0
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.checksum
@@ -0,0 +1 @@
+567b4b455062372112cd01a45c180c3a
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.png
new file mode 100644
index 0000000..277928c
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-expected.txt
new file mode 100644
index 0000000..aee49ae
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-no-overflow-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
+      RenderMenuList {SELECT} at (0,0) size 252x19 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+        RenderBlock (anonymous) at (1,1) size 250x17
+          RenderText at (2,2) size 229x13
+            text run at (2,2) width 229: "No overflow should be allowed on popup menus!"
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.checksum
new file mode 100644
index 0000000..8b258f3
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.checksum
@@ -0,0 +1 @@
+8420d9dca3ab284fe28f7a1a192e96bc
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.png
new file mode 100644
index 0000000..263191e
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.txt
new file mode 100644
index 0000000..cdf15d9
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-option-wrap-expected.txt
@@ -0,0 +1,43 @@
+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 784x576
+      RenderBlock {P} at (0,0) size 784x19
+        RenderText {#text} at (0,0) size 51x19
+          text run at (0,0) width 51: "Test for "
+        RenderInline {I} at (0,0) size 584x19
+          RenderInline {A} at (0,0) size 305x19 [color=#0000EE]
+            RenderText {#text} at (51,0) size 305x19
+              text run at (51,0) width 305: "http://bugs.webkit.org/show_bug.cgi?id=11362"
+          RenderText {#text} at (356,0) size 279x19
+            text run at (356,0) width 4: " "
+            text run at (360,0) width 275: "Native popup with size=\"1\" wraps options"
+        RenderText {#text} at (635,0) size 4x19
+          text run at (635,0) width 4: "."
+      RenderBlock {P} at (0,35) size 784x25
+        RenderText {#text} at (0,3) size 33x19
+          text run at (0,3) width 33: "With "
+        RenderInline {TT} at (0,0) size 64x15
+          RenderText {#text} at (33,7) size 64x15
+            text run at (33,7) width 64: "size=\"1\""
+        RenderText {#text} at (97,3) size 7x19
+          text run at (97,3) width 7: ": "
+        RenderMenuList {SELECT} at (104,2) size 100x21 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+          RenderBlock (anonymous) at (1,1) size 98x19
+            RenderText at (0,0) size 221x19
+              text run at (0,0) width 221: "Very long option that does not fit"
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {P} at (0,76) size 784x25
+        RenderText {#text} at (0,3) size 52x19
+          text run at (0,3) width 52: "Without "
+        RenderInline {TT} at (0,0) size 32x15
+          RenderText {#text} at (52,7) size 32x15
+            text run at (52,7) width 32: "size"
+        RenderText {#text} at (84,3) size 7x19
+          text run at (84,3) width 7: ": "
+        RenderMenuList {SELECT} at (91,2) size 100x21 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+          RenderBlock (anonymous) at (1,1) size 98x19
+            RenderText at (0,0) size 221x19
+              text run at (0,0) width 221: "Very long option that does not fit"
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.checksum
new file mode 100644
index 0000000..890ca13
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.checksum
@@ -0,0 +1 @@
+715824d14881cd58f6947184cee1272c
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.png
new file mode 100644
index 0000000..18fc384
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt
new file mode 100644
index 0000000..e50aef6
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt
@@ -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 397x19
+        text run at (0,0) width 397: "This tests that we don't honor line-height for styled popup buttons."
+      RenderBR {BR} at (397,15) size 0x0
+      RenderMenuList {SELECT} at (2,21) size 235x25 [bgcolor=#ADD8E6] [border: (1px solid #000000)]
+        RenderBlock (anonymous) at (1,1) size 233x23
+          RenderText at (2,2) size 212x19
+            text run at (2,2) width 212: "This text should not be clipped."
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.checksum
new file mode 100644
index 0000000..24cecc1
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.checksum
@@ -0,0 +1 @@
+2ccfd9cb288e2bbc8cae5ba729d9b7e6
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.png
new file mode 100644
index 0000000..a1b9380
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.txt
new file mode 100644
index 0000000..1c3f5e9
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-separator-painting-expected.txt
@@ -0,0 +1,11 @@
+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 {DIV} at (0,0) size 784x6 [border: (3px solid #FFFFFF)]
+      RenderBlock (anonymous) at (0,6) size 784x29
+        RenderMenuList {SELECT} at (2,2) size 23x25 [bgcolor=#FFFFFF] [border: (1px solid #008000)]
+          RenderBlock (anonymous) at (1,1) size 21x23
+            RenderBR at (2,2) size 0x19 [bgcolor=#FFFFFF]
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.checksum
new file mode 100644
index 0000000..1605ed3
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.checksum
@@ -0,0 +1 @@
+cf51c7a61597754e740a2e37e2f1b078
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.png
new file mode 100644
index 0000000..b2cad99
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.txt
new file mode 100644
index 0000000..1ea6e20
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-style-color-expected.txt
@@ -0,0 +1,28 @@
+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
+      RenderMenuList {SELECT} at (2,2) size 72x25 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+        RenderBlock (anonymous) at (1,1) size 70x23
+          RenderText at (2,2) size 49x19
+            text run at (2,2) width 49: "Default"
+      RenderText {#text} at (76,5) size 4x19
+        text run at (76,5) width 4: " "
+      RenderMenuList {SELECT} at (82,2) size 52x25 [color=#FF0000] [bgcolor=#FFFFFF] [border: (1px solid #FF0000)]
+        RenderBlock (anonymous) at (1,1) size 50x23
+          RenderText at (2,2) size 29x19
+            text run at (2,2) width 29: "Red"
+      RenderText {#text} at (136,5) size 4x19
+        text run at (136,5) width 4: " "
+      RenderMenuList {SELECT} at (142,2) size 137x25 [bgcolor=#008000] [border: (1px solid #000000)]
+        RenderBlock (anonymous) at (1,1) size 135x23
+          RenderText at (2,2) size 114x19
+            text run at (2,2) width 114: "Default on green"
+      RenderText {#text} at (281,5) size 4x19
+        text run at (281,5) width 4: " "
+      RenderMenuList {SELECT} at (287,2) size 117x25 [color=#FF0000] [bgcolor=#008000] [border: (1px solid #FF0000)]
+        RenderBlock (anonymous) at (1,1) size 115x23
+          RenderText at (2,2) size 94x19
+            text run at (2,2) width 94: "Red on green"
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.checksum b/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.checksum
new file mode 100644
index 0000000..f4c4e42
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.checksum
@@ -0,0 +1 @@
+eee878a7d9cb2fbee93d1a738003b9c3
\ No newline at end of file
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.png b/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.png
new file mode 100644
index 0000000..69163fe
Binary files /dev/null and b/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.png differ
diff --git a/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.txt b/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.txt
new file mode 100644
index 0000000..af897f7
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/forms/menulist-width-change-expected.txt
@@ -0,0 +1,18 @@
+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 784x67
+        RenderText {#text} at (0,0) size 627x19
+          text run at (0,0) width 627: "This tests that when an option is dynamically added to a menu list, and it is too long for the current width,"
+        RenderBR {BR} at (627,15) size 0x0
+        RenderText {#text} at (0,19) size 348x19
+          text run at (0,19) width 348: "that the select automatically recalculates the correct width."
+        RenderBR {BR} at (348,34) size 0x0
+        RenderMenuList {SELECT} at (2,40) size 159x25 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+          RenderBlock (anonymous) at (1,1) size 157x23
+            RenderText at (2,2) size 37x19
+              text run at (2,2) width 37: "Short"
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,67) size 784x0
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 79041ce..d7c033b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-10-23  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Menu list buttons do react properly to CSS styling
+        https://bugs.webkit.org/show_bug.cgi?id=48099
+
+        Correct the way that menu list buttons get their necessary padding from
+        GTK+. Instead of resetting the padding to these values, return them via
+        the popupInternalPadding* methods. Add implementations for *MenuListButton*
+        methods.
+
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::getComboBoxPadding): Added.
+        (WebCore::RenderThemeGtk::popupInternalPaddingLeft): Added.
+        (WebCore::RenderThemeGtk::popupInternalPaddingRight): Added.
+        (WebCore::RenderThemeGtk::popupInternalPaddingTop): Added.
+        (WebCore::RenderThemeGtk::popupInternalPaddingBottom): Added.
+        (WebCore::RenderThemeGtk::adjustMenuListStyle): Do not reset CSS
+        properties, instead rely on the poupInternalPadding* methods.
+        (WebCore::RenderThemeGtk::adjustMenuListButtonStyle): Added.
+        (WebCore::RenderThemeGtk::paintMenuListButton): Added.
+        * platform/gtk/RenderThemeGtk.h: Added new method declarations.
+
 2010-10-23  Patrick Gansterer  <paroga at webkit.org>
 
         Reviewed by David Kilzer.
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index b2e3fd2..8df5cda 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -450,13 +450,56 @@ bool RenderThemeGtk::paintButton(RenderObject* o, const PaintInfo& i, const IntR
     return paintRenderObject(MOZ_GTK_BUTTON, o, i.context, rect, GTK_RELIEF_NORMAL);
 }
 
-void RenderThemeGtk::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
+static void getComboBoxPadding(RenderStyle* style, int& left, int& top, int& right, int& bottom)
 {
-    style->resetBorder();
-    style->resetPadding();
-    style->setHeight(Length(Auto));
-    style->setWhiteSpace(PRE);
-    adjustMozillaStyle(this, style, MOZ_GTK_DROPDOWN);
+    // If this menu list button isn't drawn using the native theme, we
+    // don't add any extra padding beyond what WebCore already uses.
+    if (style->appearance() == NoControlPart)
+        return;
+    moz_gtk_get_widget_border(MOZ_GTK_DROPDOWN, &left, &top, &right, &bottom,
+                              gtkTextDirection(style->direction()), TRUE);
+}
+
+int RenderThemeGtk::popupInternalPaddingLeft(RenderStyle* style) const
+{
+    int left = 0, top = 0, right = 0, bottom = 0;
+    getComboBoxPadding(style, left, top, right, bottom);
+    return left;
+}
+
+int RenderThemeGtk::popupInternalPaddingRight(RenderStyle* style) const
+{
+    int left = 0, top = 0, right = 0, bottom = 0;
+    getComboBoxPadding(style, left, top, right, bottom);
+    return right;
+}
+
+int RenderThemeGtk::popupInternalPaddingTop(RenderStyle* style) const
+{
+    int left = 0, top = 0, right = 0, bottom = 0;
+    getComboBoxPadding(style, left, top, right, bottom);
+    return top;
+}
+
+int RenderThemeGtk::popupInternalPaddingBottom(RenderStyle* style) const
+{
+    int left = 0, top = 0, right = 0, bottom = 0;
+    getComboBoxPadding(style, left, top, right, bottom);
+    return bottom;
+}
+
+void RenderThemeGtk::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
+{
+    // The tests check explicitly that select menu buttons ignore line height.
+    style->setLineHeight(RenderStyle::initialLineHeight());
+
+    // We cannot give a proper rendering when border radius is active, unfortunately.
+    style->resetBorderRadius();
+}
+
+void RenderThemeGtk::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
+{
+    adjustMenuListStyle(selector, style, e);
 }
 
 bool RenderThemeGtk::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& rect)
@@ -464,6 +507,11 @@ bool RenderThemeGtk::paintMenuList(RenderObject* o, const PaintInfo& i, const In
     return paintRenderObject(MOZ_GTK_DROPDOWN, o, i.context, rect);
 }
 
+bool RenderThemeGtk::paintMenuListButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+{
+    return paintMenuList(object, info, rect);
+}
+
 void RenderThemeGtk::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
 {
     style->resetBorder();
diff --git a/WebCore/platform/gtk/RenderThemeGtk.h b/WebCore/platform/gtk/RenderThemeGtk.h
index 4e24c97..6d324b6 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.h
+++ b/WebCore/platform/gtk/RenderThemeGtk.h
@@ -5,7 +5,7 @@
  * Copyright (C) 2006 Michael Emmel mike.emmel at gmail.com
  * Copyright (C) 2007 Holger Hans Peter Freyther
  * Copyright (C) 2007 Alp Toker <alp at atoker.com>
- * Copyright (C) 2009 Kenneth Rohde Christiansen
+ * Copyright (C) 2010 Igalia S.L.
  * All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
@@ -102,8 +102,19 @@ protected:
 
     virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
 
+    int popupInternalPaddingLeft(RenderStyle*) const;
+    int popupInternalPaddingRight(RenderStyle*) const;
+    int popupInternalPaddingTop(RenderStyle*) const;
+    int popupInternalPaddingBottom(RenderStyle*) const;
+
+    // The Mac port differentiates between the "menu list" and the "menu list button."
+    // The former is used when a menu list button has been styled. This is used to ensure
+    // Aqua themed controls whenever possible. We always want to use GTK+ theming, so
+    // we don't maintain this differentiation.
     virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element* e) const;
     virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
+    virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
 
     virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
     virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list