[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

mrobinson at webkit.org mrobinson at webkit.org
Sun Feb 20 23:19:57 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit bf39f7399a4bf44bc66f6e98d8309815dede498a
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 19 23:45:51 2011 +0000

    2011-01-11  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Gustavo Noronha Silva.
    
            [GTK] Move toggle button rendering out of gtk2drawing.c
            https://bugs.webkit.org/show_bug.cgi?id=52258
    
            Updated results. The metrics of checkboxes and radio buttons have changed,
            because the focus rect is no longer considered to be part of the button.
    
            * platform/gtk/fast/css/non-standard-checkbox-size-expected.txt
            * platform/gtk/fast/forms/001-expected.txt:
            * platform/gtk/fast/forms/basic-inputs-expected.txt:
            * platform/gtk/fast/forms/box-shadow-override-expected.txt:
            * platform/gtk/fast/forms/checkbox-radio-onchange-expected.txt:
            * platform/gtk/fast/forms/file-input-disabled-expected.txt:
            * platform/gtk/fast/forms/form-element-geometry-expected.txt:
            * platform/gtk/fast/forms/formmove-expected.txt:
            * platform/gtk/fast/forms/formmove2-expected.txt:
            * platform/gtk/fast/forms/indeterminate-expected.txt:
            * platform/gtk/fast/forms/input-appearance-height-expected.txt:
            * platform/gtk/fast/forms/input-value-expected.txt:
            * platform/gtk/fast/forms/radio-attr-order-expected.txt:
            * platform/gtk/fast/forms/radio-nested-labels-expected.txt:
            * platform/gtk/fast/forms/radio_checked-expected.txt:
            * platform/gtk/fast/forms/radio_checked_dynamic-expected.txt:
    2011-01-11  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Gustavo Noronha Silva.
    
            [GTK] Move toggle button rendering out of gtk2drawing.c
            https://bugs.webkit.org/show_bug.cgi?id=52258
    
            * platform/gtk/RenderThemeGtk.h:
            * platform/gtk/RenderThemeGtk2.cpp:
            (WebCore::RenderThemeGtk::platformInit): Initialize new button members.
            (WebCore::adjustRectForFocus): Added this function which inflates a rect based
            on a widget's exterior focus.
            (WebCore::RenderThemeGtk::adjustRepaintRect): Account for exterior focus.
            (WebCore::setToggleSize): Only listen to indicator-size to properly size
            checkboxes and radio buttons.
            (WebCore::RenderThemeGtk::setCheckboxSize): Call new setToggleSize properly.
            (WebCore::paintToggle): Added.
            (WebCore::RenderThemeGtk::paintCheckbox): Call paintToggle.
            (WebCore::RenderThemeGtk::setRadioSize): Call new setToggleSize properly.
            (WebCore::RenderThemeGtk::paintRadio): Call paintToggle.
            (WebCore::RenderThemeGtk::gtkRadioButton): Added.
            (WebCore::RenderThemeGtk::gtkCheckButton): Added.
            * platform/gtk/WidgetRenderingContext.cpp:
            (WebCore::WidgetRenderingContext::WidgetRenderingContext): Use a static extra space
            variable. This is good enough for all themes that I've tested and prevents having to
            pass information from RenderThemeGtk about every single type of widget.
            (WebCore::WidgetRenderingContext::gtkPaintFocus): Use the paintRect
            to draw instead of m_paintRect. This is important when we're painting
            something that isn't the size of the total rect.
            (WebCore::WidgetRenderingContext::gtkPaintCheck): Added.
            (WebCore::WidgetRenderingContext::gtkPaintOption): Added.
            * platform/gtk/WidgetRenderingContext.h: Updated to reflect new methods.
            * platform/gtk/gtkdrawing.h: Remove newly unused code.
            * platform/gtk/gtk2drawing.c: Ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76175 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1c8e4ff..0dd9c7b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,30 @@
+2011-01-11  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Gustavo Noronha Silva.
+
+        [GTK] Move toggle button rendering out of gtk2drawing.c
+        https://bugs.webkit.org/show_bug.cgi?id=52258
+
+        Updated results. The metrics of checkboxes and radio buttons have changed,
+        because the focus rect is no longer considered to be part of the button.
+
+        * platform/gtk/fast/css/non-standard-checkbox-size-expected.txt
+        * platform/gtk/fast/forms/001-expected.txt:
+        * platform/gtk/fast/forms/basic-inputs-expected.txt:
+        * platform/gtk/fast/forms/box-shadow-override-expected.txt:
+        * platform/gtk/fast/forms/checkbox-radio-onchange-expected.txt:
+        * platform/gtk/fast/forms/file-input-disabled-expected.txt:
+        * platform/gtk/fast/forms/form-element-geometry-expected.txt:
+        * platform/gtk/fast/forms/formmove-expected.txt:
+        * platform/gtk/fast/forms/formmove2-expected.txt:
+        * platform/gtk/fast/forms/indeterminate-expected.txt:
+        * platform/gtk/fast/forms/input-appearance-height-expected.txt:
+        * platform/gtk/fast/forms/input-value-expected.txt:
+        * platform/gtk/fast/forms/radio-attr-order-expected.txt:
+        * platform/gtk/fast/forms/radio-nested-labels-expected.txt:
+        * platform/gtk/fast/forms/radio_checked-expected.txt:
+        * platform/gtk/fast/forms/radio_checked_dynamic-expected.txt:
+
 2011-01-19  Martin Robinson  <mrobinson at igalia.com>
 
         Unskip a test now that the 32-bit debug bot has the 2.4 series of FreeType.
diff --git a/LayoutTests/platform/gtk/fast/css/non-standard-checkbox-size-expected.txt b/LayoutTests/platform/gtk/fast/css/non-standard-checkbox-size-expected.txt
index 137e843..d8c38c5 100644
--- a/LayoutTests/platform/gtk/fast/css/non-standard-checkbox-size-expected.txt
+++ b/LayoutTests/platform/gtk/fast/css/non-standard-checkbox-size-expected.txt
@@ -5,8 +5,8 @@ layer at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
       RenderText {#text} at (0,36) size 289x19
         text run at (0,36) width 289: "The following inputs should not be stretched. "
-      RenderBlock {INPUT} at (293,3) size 15x50
-      RenderText {#text} at (312,36) size 4x19
-        text run at (312,36) width 4: " "
-      RenderBlock {INPUT} at (320,3) size 15x50
+      RenderBlock {INPUT} at (293,3) size 13x50
+      RenderText {#text} at (310,36) size 4x19
+        text run at (310,36) width 4: " "
+      RenderBlock {INPUT} at (318,3) size 13x50
       RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/001-expected.txt b/LayoutTests/platform/gtk/fast/forms/001-expected.txt
index c6ea36a..89b4ff3 100644
--- a/LayoutTests/platform/gtk/fast/forms/001-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/001-expected.txt
@@ -19,16 +19,16 @@ layer at (0,0) size 800x600
         RenderTable {TABLE} at (0,0) size 784x24 [border: (2px outset #808080)]
           RenderTableSection {TBODY} at (2,2) size 780x20
             RenderTableRow {TR} at (0,0) size 780x20
-              RenderTableCell {TD} at (0,0) size 25x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-                RenderBlock {INPUT} at (5,4) size 15x12
-              RenderTableCell {TD} at (25,9) size 755x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (0,0) size 23x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                RenderBlock {INPUT} at (5,4) size 13x12
+              RenderTableCell {TD} at (23,9) size 757x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
       RenderBlock {P} at (0,200) size 784x24
         RenderTable {TABLE} at (0,0) size 784x24 [border: (2px outset #808080)]
           RenderTableSection {TBODY} at (2,2) size 780x20
             RenderTableRow {TR} at (0,0) size 780x20
-              RenderTableCell {TD} at (0,0) size 25x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-                RenderBlock {INPUT} at (5,4) size 15x12
-              RenderTableCell {TD} at (25,9) size 755x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (0,0) size 23x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                RenderBlock {INPUT} at (5,4) size 13x12
+              RenderTableCell {TD} at (23,9) size 757x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
       RenderBlock {P} at (0,240) size 784x38
         RenderTable {TABLE} at (0,0) size 784x38 [border: (2px outset #808080)]
           RenderTableSection {TBODY} at (2,2) size 780x34
diff --git a/LayoutTests/platform/gtk/fast/forms/basic-inputs-expected.txt b/LayoutTests/platform/gtk/fast/forms/basic-inputs-expected.txt
index bdef64c..59a5b1a 100644
--- a/LayoutTests/platform/gtk/fast/forms/basic-inputs-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/basic-inputs-expected.txt
@@ -48,24 +48,24 @@ layer at (0,0) size 800x600
         RenderTextControl {INPUT} at (3,61) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
         RenderText {#text} at (199,64) size 8x19
           text run at (199,64) width 8: "b"
-      RenderBlock {DIV} at (10,432) size 450x23 [border: (1px solid #FF0000)]
-        RenderText {#text} at (1,2) size 7x19
-          text run at (1,2) width 7: "a"
-        RenderBlock {INPUT} at (12,4) size 15x15
-        RenderText {#text} at (31,2) size 65x19
-          text run at (31,2) width 65: "checkbox "
-        RenderBlock {INPUT} at (100,4) size 15x15
-        RenderText {#text} at (119,2) size 8x19
-          text run at (119,2) width 8: "b"
-      RenderBlock {DIV} at (10,465) size 450x23 [border: (1px solid #FF0000)]
-        RenderText {#text} at (1,2) size 7x19
-          text run at (1,2) width 7: "a"
-        RenderBlock {INPUT} at (12,4) size 15x15
-        RenderText {#text} at (31,2) size 36x19
-          text run at (31,2) width 36: "radio "
-        RenderBlock {INPUT} at (71,4) size 15x15
-        RenderText {#text} at (90,2) size 8x19
-          text run at (90,2) width 8: "b"
+      RenderBlock {DIV} at (10,432) size 450x22 [border: (1px solid #FF0000)]
+        RenderText {#text} at (1,1) size 7x19
+          text run at (1,1) width 7: "a"
+        RenderBlock {INPUT} at (12,5) size 13x13
+        RenderText {#text} at (29,1) size 65x19
+          text run at (29,1) width 65: "checkbox "
+        RenderBlock {INPUT} at (98,5) size 13x13
+        RenderText {#text} at (115,1) size 8x19
+          text run at (115,1) width 8: "b"
+      RenderBlock {DIV} at (10,464) size 450x22 [border: (1px solid #FF0000)]
+        RenderText {#text} at (1,1) size 7x19
+          text run at (1,1) width 7: "a"
+        RenderBlock {INPUT} at (12,5) size 13x13
+        RenderText {#text} at (29,1) size 36x19
+          text run at (29,1) width 36: "radio "
+        RenderBlock {INPUT} at (69,5) size 13x13
+        RenderText {#text} at (86,1) size 8x19
+          text run at (86,1) width 8: "b"
 layer at (31,347) size 188x19 scrollWidth 215
   RenderBlock {DIV} at (3,3) size 188x19
     RenderText {#text} at (1,0) size 213x19
diff --git a/LayoutTests/platform/gtk/fast/forms/box-shadow-override-expected.txt b/LayoutTests/platform/gtk/fast/forms/box-shadow-override-expected.txt
index 9d6d82d..b0b4baf 100644
--- a/LayoutTests/platform/gtk/fast/forms/box-shadow-override-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/box-shadow-override-expected.txt
@@ -28,42 +28,42 @@ layer at (0,0) size 800x600
             RenderBlock {DIV} at (172,0) size 16x16
         RenderText {#text} at (0,0) size 0x0
       RenderBlock (anonymous) at (0,157) size 784x37
-        RenderBlock {INPUT} at (4,12) size 15x15
-        RenderText {#text} at (23,10) size 4x19
-          text run at (23,10) width 4: " "
-        RenderBlock {INPUT} at (31,12) size 15x15
-        RenderText {#text} at (50,10) size 4x19
-          text run at (50,10) width 4: " "
-        RenderSlider {INPUT} at (56,11) size 129x14 [bgcolor=#FFFFFF]
+        RenderBlock {INPUT} at (4,14) size 13x13
+        RenderText {#text} at (21,10) size 4x19
+          text run at (21,10) width 4: " "
+        RenderBlock {INPUT} at (29,14) size 13x13
+        RenderText {#text} at (46,10) size 4x19
+          text run at (46,10) width 4: " "
+        RenderSlider {INPUT} at (52,11) size 129x14 [bgcolor=#FFFFFF]
           RenderBlock {DIV} at (49,0) size 31x14
-        RenderText {#text} at (187,10) size 4x19
-          text run at (187,10) width 4: " "
-        RenderFileUploadControl {INPUT} at (193,6) size 306x28 "(None)"
+        RenderText {#text} at (183,10) size 4x19
+          text run at (183,10) width 4: " "
+        RenderFileUploadControl {INPUT} at (189,6) size 306x28 "(None)"
           RenderButton {INPUT} at (0,0) size 103x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
             RenderBlock (anonymous) at (8,4) size 87x19
               RenderText at (0,0) size 87x19
                 text run at (0,0) width 87: "Choose File"
-        RenderText {#text} at (501,10) size 4x19
-          text run at (501,10) width 4: " "
-        RenderButton {INPUT} at (507,2) size 74x33 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        RenderText {#text} at (497,10) size 4x19
+          text run at (497,10) width 4: " "
+        RenderButton {INPUT} at (503,2) size 74x33 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
           RenderBlock (anonymous) at (8,4) size 58x24
             RenderText at (0,0) size 58x24
               text run at (0,0) width 58: "Button"
-        RenderText {#text} at (583,10) size 4x19
-          text run at (583,10) width 4: " "
-        RenderButton {INPUT} at (589,6) size 62x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        RenderText {#text} at (579,10) size 4x19
+          text run at (579,10) width 4: " "
+        RenderButton {INPUT} at (585,6) size 62x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
           RenderBlock (anonymous) at (8,4) size 46x19
             RenderText at (0,0) size 46x19
               text run at (0,0) width 46: "Button"
-        RenderText {#text} at (653,10) size 4x19
-          text run at (653,10) width 4: " "
-        RenderButton {INPUT} at (657,16) size 30x16 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        RenderText {#text} at (649,10) size 4x19
+          text run at (649,10) width 4: " "
+        RenderButton {INPUT} at (653,16) size 30x16 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
           RenderBlock (anonymous) at (8,4) size 14x7
             RenderText at (0,0) size 14x7
               text run at (0,0) width 14: "Button"
-        RenderText {#text} at (687,10) size 4x19
-          text run at (687,10) width 4: " "
-        RenderButton {BUTTON} at (693,2) size 74x33 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        RenderText {#text} at (683,10) size 4x19
+          text run at (683,10) width 4: " "
+        RenderButton {BUTTON} at (689,2) size 74x33 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
           RenderBlock (anonymous) at (8,4) size 58x24
             RenderText {#text} at (0,0) size 58x24
               text run at (0,0) width 58: "Button"
diff --git a/LayoutTests/platform/gtk/fast/forms/checkbox-radio-onchange-expected.txt b/LayoutTests/platform/gtk/fast/forms/checkbox-radio-onchange-expected.txt
index ce5c52d..cf514a1 100644
--- a/LayoutTests/platform/gtk/fast/forms/checkbox-radio-onchange-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/checkbox-radio-onchange-expected.txt
@@ -3,23 +3,23 @@ layer 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 784x40
+      RenderBlock (anonymous) at (0,0) size 784x39
         RenderText {#text} at (0,0) size 364x19
           text run at (0,0) width 364: "This is to test onchange of checkboxes and radio buttons. "
         RenderBR {BR} at (364,15) size 0x0
-        RenderBlock {INPUT} at (4,22) size 15x15
-        RenderText {#text} at (23,20) size 65x19
-          text run at (23,20) width 65: "Checkbox"
-      RenderBlock {DIV} at (0,40) size 784x19
+        RenderBlock {INPUT} at (4,23) size 13x13
+        RenderText {#text} at (21,19) size 65x19
+          text run at (21,19) width 65: "Checkbox"
+      RenderBlock {DIV} at (0,39) size 784x19
         RenderText {#text} at (0,0) size 321x19
           text run at (0,0) width 321: "Test 1 Passed. onChange event fired for checkbox."
-      RenderBlock (anonymous) at (0,59) size 784x21
-        RenderBlock {INPUT} at (4,3) size 15x15
-        RenderText {#text} at (23,1) size 54x19
-          text run at (23,1) width 54: "Radio 1 "
-        RenderBlock {INPUT} at (81,3) size 15x15
-        RenderText {#text} at (100,1) size 50x19
-          text run at (100,1) width 50: "Radio 2"
-      RenderBlock {DIV} at (0,80) size 784x19
+      RenderBlock (anonymous) at (0,58) size 784x20
+        RenderBlock {INPUT} at (4,4) size 13x13
+        RenderText {#text} at (21,0) size 54x19
+          text run at (21,0) width 54: "Radio 1 "
+        RenderBlock {INPUT} at (79,4) size 13x13
+        RenderText {#text} at (96,0) size 50x19
+          text run at (96,0) width 50: "Radio 2"
+      RenderBlock {DIV} at (0,78) size 784x19
         RenderText {#text} at (0,0) size 336x19
           text run at (0,0) width 336: "Test 2 Passed. onChange event fired for radio button."
diff --git a/LayoutTests/platform/gtk/fast/forms/file-input-disabled-expected.txt b/LayoutTests/platform/gtk/fast/forms/file-input-disabled-expected.txt
index 119731c..b0a6d95 100644
--- a/LayoutTests/platform/gtk/fast/forms/file-input-disabled-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/file-input-disabled-expected.txt
@@ -3,20 +3,20 @@ layer 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 {FORM} at (0,0) size 784x72
-        RenderBlock (anonymous) at (0,0) size 784x72
-          RenderBlock {INPUT} at (4,3) size 15x15
+      RenderBlock {FORM} at (0,0) size 784x71
+        RenderBlock (anonymous) at (0,0) size 784x71
+          RenderBlock {INPUT} at (4,4) size 13x13
           RenderInline {B} at (0,0) size 75x19
-            RenderText {#text} at (23,1) size 75x19
-              text run at (23,1) width 75: "Attach File"
-          RenderBR {BR} at (98,16) size 0x0
-          RenderBR {BR} at (0,21) size 0x19
-          RenderText {#text} at (0,46) size 86x19
-            text run at (0,46) width 86: "  Select File:  "
-          RenderFileUploadControl {INPUT} at (88,42) size 306x28 "(None)"
+            RenderText {#text} at (21,0) size 75x19
+              text run at (21,0) width 75: "Attach File"
+          RenderBR {BR} at (96,15) size 0x0
+          RenderBR {BR} at (0,20) size 0x19
+          RenderText {#text} at (0,45) size 86x19
+            text run at (0,45) width 86: "  Select File:  "
+          RenderFileUploadControl {INPUT} at (88,41) size 306x28 "(None)"
             RenderButton {INPUT} at (0,0) size 103x28 [color=#808080] [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
               RenderBlock (anonymous) at (8,4) size 87x19
                 RenderText at (0,0) size 87x19
                   text run at (0,0) width 87: "Choose File"
-          RenderBR {BR} at (396,61) size 0x0
-        RenderTable {TABLE} at (0,72) size 4x0
+          RenderBR {BR} at (396,60) size 0x0
+        RenderTable {TABLE} at (0,71) size 4x0
diff --git a/LayoutTests/platform/gtk/fast/forms/form-element-geometry-expected.txt b/LayoutTests/platform/gtk/fast/forms/form-element-geometry-expected.txt
index 1bcbdd5..49c6f08 100644
--- a/LayoutTests/platform/gtk/fast/forms/form-element-geometry-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/form-element-geometry-expected.txt
@@ -12,9 +12,9 @@ layer at (0,0) size 781x741
       RenderBlock {H2} at (0,96) size 765x28
         RenderText {#text} at (0,0) size 165x28
           text run at (0,0) width 165: "Bounding Boxes"
-      RenderTable {TABLE} at (0,143) size 187x38
-        RenderTableSection {TBODY} at (0,0) size 187x38
-          RenderTableRow {TR} at (0,2) size 187x34
+      RenderTable {TABLE} at (0,143) size 183x38
+        RenderTableSection {TBODY} at (0,0) size 183x38
+          RenderTableRow {TR} at (0,2) size 183x34
             RenderTableCell {TD} at (2,2) size 66x34 [r=0 c=0 rs=1 cs=1]
               RenderBlock {DIV} at (1,1) size 64x32 [border: (2px solid #0000FF)]
                 RenderInline {FONT} at (0,0) size 60x28
@@ -29,17 +29,17 @@ layer at (0,0) size 781x741
                     RenderBlock (anonymous) at (1,1) size 61x23
                       RenderText at (2,2) size 40x19
                         text run at (2,2) width 40: "menu"
-            RenderTableCell {TD} at (141,8) size 21x21 [r=0 c=2 rs=1 cs=1]
-              RenderBlock {DIV} at (1,1) size 19x19 [border: (2px solid #0000FF)]
-                RenderInline {FONT} at (0,0) size 15x28
-                  RenderBlock {INPUT} at (2,2) size 15x15
-            RenderTableCell {TD} at (164,8) size 21x21 [r=0 c=3 rs=1 cs=1]
-              RenderBlock {DIV} at (1,1) size 19x19 [border: (2px solid #0000FF)]
-                RenderInline {FONT} at (0,0) size 15x28
-                  RenderBlock {INPUT} at (2,2) size 15x15
-      RenderTable {TABLE} at (0,181) size 187x38
-        RenderTableSection {TBODY} at (0,0) size 187x38
-          RenderTableRow {TR} at (0,2) size 187x34
+            RenderTableCell {TD} at (141,9) size 19x19 [r=0 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (1,1) size 17x17 [border: (2px solid #0000FF)]
+                RenderInline {FONT} at (0,0) size 13x28
+                  RenderBlock {INPUT} at (2,2) size 13x13
+            RenderTableCell {TD} at (162,9) size 19x19 [r=0 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (1,1) size 17x17 [border: (2px solid #0000FF)]
+                RenderInline {FONT} at (0,0) size 13x28
+                  RenderBlock {INPUT} at (2,2) size 13x13
+      RenderTable {TABLE} at (0,181) size 183x38
+        RenderTableSection {TBODY} at (0,0) size 183x38
+          RenderTableRow {TR} at (0,2) size 183x34
             RenderTableCell {TD} at (2,2) size 66x34 [r=0 c=0 rs=1 cs=1]
               RenderBlock {DIV} at (1,1) size 64x32 [border: (2px solid #0000FF)]
                 RenderButton {INPUT} at (2,2) size 60x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
@@ -52,15 +52,15 @@ layer at (0,0) size 781x741
                   RenderBlock (anonymous) at (1,1) size 61x23
                     RenderText at (2,2) size 40x19
                       text run at (2,2) width 40: "menu"
-            RenderTableCell {TD} at (141,8) size 21x21 [r=0 c=2 rs=1 cs=1]
-              RenderBlock {DIV} at (1,1) size 19x19 [border: (2px solid #0000FF)]
-                RenderBlock {INPUT} at (2,2) size 15x15
-            RenderTableCell {TD} at (164,8) size 21x21 [r=0 c=3 rs=1 cs=1]
-              RenderBlock {DIV} at (1,1) size 19x19 [border: (2px solid #0000FF)]
-                RenderBlock {INPUT} at (2,2) size 15x15
-      RenderTable {TABLE} at (0,219) size 187x38
-        RenderTableSection {TBODY} at (0,0) size 187x38
-          RenderTableRow {TR} at (0,2) size 187x34
+            RenderTableCell {TD} at (141,9) size 19x19 [r=0 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (1,1) size 17x17 [border: (2px solid #0000FF)]
+                RenderBlock {INPUT} at (2,2) size 13x13
+            RenderTableCell {TD} at (162,9) size 19x19 [r=0 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (1,1) size 17x17 [border: (2px solid #0000FF)]
+                RenderBlock {INPUT} at (2,2) size 13x13
+      RenderTable {TABLE} at (0,219) size 183x38
+        RenderTableSection {TBODY} at (0,0) size 183x38
+          RenderTableRow {TR} at (0,2) size 183x34
             RenderTableCell {TD} at (2,2) size 66x34 [r=0 c=0 rs=1 cs=1]
               RenderBlock {DIV} at (1,1) size 64x32 [border: (2px solid #0000FF)]
                 RenderInline {FONT} at (0,0) size 60x12
@@ -75,14 +75,14 @@ layer at (0,0) size 781x741
                     RenderBlock (anonymous) at (1,1) size 61x23
                       RenderText at (2,2) size 40x19
                         text run at (2,2) width 40: "menu"
-            RenderTableCell {TD} at (141,8) size 21x21 [r=0 c=2 rs=1 cs=1]
-              RenderBlock {DIV} at (1,1) size 19x19 [border: (2px solid #0000FF)]
-                RenderInline {FONT} at (0,0) size 15x12
-                  RenderBlock {INPUT} at (2,2) size 15x15
-            RenderTableCell {TD} at (164,8) size 21x21 [r=0 c=3 rs=1 cs=1]
-              RenderBlock {DIV} at (1,1) size 19x19 [border: (2px solid #0000FF)]
-                RenderInline {FONT} at (0,0) size 15x12
-                  RenderBlock {INPUT} at (2,2) size 15x15
+            RenderTableCell {TD} at (141,9) size 19x19 [r=0 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (1,1) size 17x17 [border: (2px solid #0000FF)]
+                RenderInline {FONT} at (0,0) size 13x12
+                  RenderBlock {INPUT} at (2,2) size 13x13
+            RenderTableCell {TD} at (162,9) size 19x19 [r=0 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (1,1) size 17x17 [border: (2px solid #0000FF)]
+                RenderInline {FONT} at (0,0) size 13x12
+                  RenderBlock {INPUT} at (2,2) size 13x13
       RenderTable {TABLE} at (0,257) size 692x91
         RenderTableSection {TBODY} at (0,0) size 692x91
           RenderTableRow {TR} at (0,2) size 692x87
@@ -105,7 +105,7 @@ layer at (0,0) size 781x741
         RenderText {#text} at (0,0) size 200x28
           text run at (0,0) width 200: "Baseline Alignment"
       RenderBlock {DIV} at (0,414) size 765x33
-        RenderInline {FONT} at (0,0) size 238x28
+        RenderInline {FONT} at (0,0) size 234x28
           RenderText {#text} at (0,0) size 43x28
             text run at (0,0) width 43: "text "
           RenderButton {INPUT} at (45,3) size 60x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
@@ -120,10 +120,10 @@ layer at (0,0) size 781x741
                 text run at (2,2) width 40: "menu"
           RenderText {#text} at (180,0) size 6x28
             text run at (180,0) width 6: " "
-          RenderBlock {INPUT} at (190,9) size 15x15
-          RenderText {#text} at (209,0) size 6x28
-            text run at (209,0) width 6: " "
-          RenderBlock {INPUT} at (219,9) size 15x15
+          RenderBlock {INPUT} at (190,11) size 13x13
+          RenderText {#text} at (207,0) size 6x28
+            text run at (207,0) width 6: " "
+          RenderBlock {INPUT} at (217,11) size 13x13
           RenderText {#text} at (0,0) size 0x0
       RenderBlock {DIV} at (0,447) size 765x32
         RenderText {#text} at (0,6) size 27x19
@@ -140,13 +140,13 @@ layer at (0,0) size 781x741
               text run at (2,2) width 40: "menu"
         RenderText {#text} at (162,6) size 4x19
           text run at (162,6) width 4: " "
-        RenderBlock {INPUT} at (170,8) size 15x15
-        RenderText {#text} at (189,6) size 4x19
-          text run at (189,6) width 4: " "
-        RenderBlock {INPUT} at (197,8) size 15x15
+        RenderBlock {INPUT} at (170,10) size 13x13
+        RenderText {#text} at (187,6) size 4x19
+          text run at (187,6) width 4: " "
+        RenderBlock {INPUT} at (195,10) size 13x13
         RenderText {#text} at (0,0) size 0x0
       RenderBlock {DIV} at (0,479) size 765x32
-        RenderInline {FONT} at (0,0) size 204x12
+        RenderInline {FONT} at (0,0) size 200x12
           RenderText {#text} at (0,12) size 18x12
             text run at (0,12) width 18: "text "
           RenderButton {INPUT} at (20,2) size 60x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
@@ -161,10 +161,10 @@ layer at (0,0) size 781x741
                 text run at (2,2) width 40: "menu"
           RenderText {#text} at (152,12) size 3x12
             text run at (152,12) width 3: " "
-          RenderBlock {INPUT} at (159,8) size 15x15
-          RenderText {#text} at (178,12) size 3x12
-            text run at (178,12) width 3: " "
-          RenderBlock {INPUT} at (185,8) size 15x15
+          RenderBlock {INPUT} at (159,10) size 13x13
+          RenderText {#text} at (176,12) size 3x12
+            text run at (176,12) width 3: " "
+          RenderBlock {INPUT} at (183,10) size 13x13
           RenderText {#text} at (0,0) size 0x0
       RenderBlock {DIV} at (0,511) size 765x59
         RenderText {#text} at (0,33) size 27x19
diff --git a/LayoutTests/platform/gtk/fast/forms/formmove-expected.txt b/LayoutTests/platform/gtk/fast/forms/formmove-expected.txt
index adc998b..a1f78e7 100644
--- a/LayoutTests/platform/gtk/fast/forms/formmove-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/formmove-expected.txt
@@ -3,27 +3,27 @@ layer 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 {FORM} at (0,0) size 784x21
-        RenderBlock {INPUT} at (4,3) size 15x15
-        RenderText {#text} at (23,1) size 34x19
-          text run at (23,1) width 34: "Two "
-        RenderBlock {INPUT} at (61,3) size 15x15
-        RenderText {#text} at (80,1) size 37x19
-          text run at (80,1) width 37: "Three"
-      RenderBlock {FORM} at (0,37) size 784x21
-        RenderBlock {INPUT} at (4,3) size 15x15
-        RenderText {#text} at (23,1) size 31x19
-          text run at (23,1) width 31: "One "
-        RenderBlock {INPUT} at (58,3) size 15x15
-        RenderText {#text} at (77,1) size 34x19
-          text run at (77,1) width 34: "Two "
-        RenderBlock {INPUT} at (115,3) size 15x15
-        RenderText {#text} at (134,1) size 41x19
-          text run at (134,1) width 41: "Three "
-        RenderBlock {INPUT} at (179,3) size 15x15
-        RenderText {#text} at (198,1) size 27x19
-          text run at (198,1) width 27: "One"
-      RenderBlock (anonymous) at (0,74) size 784x38
+      RenderBlock {FORM} at (0,0) size 784x20
+        RenderBlock {INPUT} at (4,4) size 13x13
+        RenderText {#text} at (21,0) size 34x19
+          text run at (21,0) width 34: "Two "
+        RenderBlock {INPUT} at (59,4) size 13x13
+        RenderText {#text} at (76,0) size 37x19
+          text run at (76,0) width 37: "Three"
+      RenderBlock {FORM} at (0,36) size 784x20
+        RenderBlock {INPUT} at (4,4) size 13x13
+        RenderText {#text} at (21,0) size 31x19
+          text run at (21,0) width 31: "One "
+        RenderBlock {INPUT} at (56,4) size 13x13
+        RenderText {#text} at (73,0) size 34x19
+          text run at (73,0) width 34: "Two "
+        RenderBlock {INPUT} at (111,4) size 13x13
+        RenderText {#text} at (128,0) size 41x19
+          text run at (128,0) width 41: "Three "
+        RenderBlock {INPUT} at (173,4) size 13x13
+        RenderText {#text} at (190,0) size 27x19
+          text run at (190,0) width 27: "One"
+      RenderBlock (anonymous) at (0,72) size 784x38
         RenderText {#text} at (0,0) size 766x38
           text run at (0,0) width 505: "The count of the # of elements in form 1 should be 2 and in form 2 should be 4. "
           text run at (505,0) width 261: "The count in form 1 is 2, and the count in"
diff --git a/LayoutTests/platform/gtk/fast/forms/formmove2-expected.txt b/LayoutTests/platform/gtk/fast/forms/formmove2-expected.txt
index 2ba48d8..3327fac 100644
--- a/LayoutTests/platform/gtk/fast/forms/formmove2-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/formmove2-expected.txt
@@ -3,10 +3,10 @@ layer 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 {FORM} at (0,0) size 784x21
-        RenderBlock {INPUT} at (4,3) size 15x15
-        RenderBlock {INPUT} at (27,3) size 15x15
-      RenderBlock (anonymous) at (0,37) size 784x38
+      RenderBlock {FORM} at (0,0) size 784x19
+        RenderBlock {INPUT} at (4,3) size 13x13
+        RenderBlock {INPUT} at (25,3) size 13x13
+      RenderBlock (anonymous) at (0,35) size 784x38
         RenderText {#text} at (0,0) size 777x38
           text run at (0,0) width 777: "There should be two elements in the first form and one in the second. The count in form one is 2, and the count in form two"
           text run at (0,19) width 26: "is 1."
diff --git a/LayoutTests/platform/gtk/fast/forms/indeterminate-expected.txt b/LayoutTests/platform/gtk/fast/forms/indeterminate-expected.txt
index 961223e..789e555 100644
--- a/LayoutTests/platform/gtk/fast/forms/indeterminate-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/indeterminate-expected.txt
@@ -3,8 +3,8 @@ layer 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 (23,1) size 491x19
-        text run at (23,1) width 491: " This checkbox should look 50% transparent and should be in the mixed state."
+      RenderText {#text} at (21,0) size 491x19
+        text run at (21,0) width 491: " This checkbox should look 50% transparent and should be in the mixed state."
       RenderText {#text} at (0,0) size 0x0
-layer at (12,11) size 15x15
-  RenderBlock {INPUT} at (4,3) size 15x15
+layer at (12,12) size 13x13
+  RenderBlock {INPUT} at (4,4) size 13x13
diff --git a/LayoutTests/platform/gtk/fast/forms/input-appearance-height-expected.txt b/LayoutTests/platform/gtk/fast/forms/input-appearance-height-expected.txt
index 9a658c6..75f5e60 100644
--- a/LayoutTests/platform/gtk/fast/forms/input-appearance-height-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/input-appearance-height-expected.txt
@@ -6,7 +6,7 @@ layer at (0,0) size 800x600
       RenderBlock (anonymous) at (0,0) size 784x19
         RenderText {#text} at (0,0) size 762x19
           text run at (0,0) width 762: "This tests the height attribute of form elements. The only element that should honour this value is the Image type of input."
-      RenderBlock {FORM} at (0,19) size 784x322
+      RenderBlock {FORM} at (0,19) size 784x320
         RenderText {#text} at (0,5) size 36x19
           text run at (0,5) width 36: "input "
         RenderTextControl {INPUT} at (38,2) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
@@ -19,74 +19,74 @@ layer at (0,0) size 800x600
         RenderText {#text} at (225,34) size 4x19
           text run at (225,34) width 4: " "
         RenderBR {BR} at (229,49) size 0x0
-        RenderText {#text} at (0,59) size 65x19
-          text run at (0,59) width 65: "checkbox "
-        RenderBlock {INPUT} at (69,61) size 15x15
-        RenderText {#text} at (88,59) size 4x19
-          text run at (88,59) width 4: " "
-        RenderBR {BR} at (92,74) size 0x0
-        RenderText {#text} at (0,85) size 24x19
-          text run at (0,85) width 24: "file "
-        RenderFileUploadControl {INPUT} at (26,81) size 306x28 "(None)"
+        RenderText {#text} at (0,58) size 65x19
+          text run at (0,58) width 65: "checkbox "
+        RenderBlock {INPUT} at (69,62) size 13x13
+        RenderText {#text} at (86,58) size 4x19
+          text run at (86,58) width 4: " "
+        RenderBR {BR} at (90,73) size 0x0
+        RenderText {#text} at (0,84) size 24x19
+          text run at (0,84) width 24: "file "
+        RenderFileUploadControl {INPUT} at (26,80) size 306x28 "(None)"
           RenderButton {INPUT} at (0,0) size 103x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
             RenderBlock (anonymous) at (8,4) size 87x19
               RenderText at (0,0) size 87x19
                 text run at (0,0) width 87: "Choose File"
-        RenderText {#text} at (334,85) size 4x19
-          text run at (334,85) width 4: " "
-        RenderBR {BR} at (338,100) size 0x0
-        RenderText {#text} at (0,111) size 42x19
-          text run at (0,111) width 42: "image "
-        RenderImage {INPUT} at (42,125) size 10x1
-        RenderText {#text} at (52,111) size 4x19
-          text run at (52,111) width 4: " "
-        RenderBR {BR} at (56,126) size 0x0
-        RenderText {#text} at (0,131) size 36x19
-          text run at (0,131) width 36: "radio "
-        RenderBlock {INPUT} at (40,133) size 15x15
-        RenderText {#text} at (59,131) size 4x19
-          text run at (59,131) width 4: " "
-        RenderBR {BR} at (63,146) size 0x0
-        RenderText {#text} at (0,152) size 39x19
-          text run at (0,152) width 39: "range "
-        RenderSlider {INPUT} at (41,153) size 129x14 [bgcolor=#FFFFFF]
+        RenderText {#text} at (334,84) size 4x19
+          text run at (334,84) width 4: " "
+        RenderBR {BR} at (338,99) size 0x0
+        RenderText {#text} at (0,110) size 42x19
+          text run at (0,110) width 42: "image "
+        RenderImage {INPUT} at (42,124) size 10x1
+        RenderText {#text} at (52,110) size 4x19
+          text run at (52,110) width 4: " "
+        RenderBR {BR} at (56,125) size 0x0
+        RenderText {#text} at (0,129) size 36x19
+          text run at (0,129) width 36: "radio "
+        RenderBlock {INPUT} at (40,133) size 13x13
+        RenderText {#text} at (57,129) size 4x19
+          text run at (57,129) width 4: " "
+        RenderBR {BR} at (61,144) size 0x0
+        RenderText {#text} at (0,150) size 39x19
+          text run at (0,150) width 39: "range "
+        RenderSlider {INPUT} at (41,151) size 129x14 [bgcolor=#FFFFFF]
           RenderBlock {DIV} at (49,0) size 31x14
-        RenderText {#text} at (172,152) size 4x19
-          text run at (172,152) width 4: " "
-        RenderBR {BR} at (176,167) size 0x0
-        RenderText {#text} at (0,177) size 33x19
-          text run at (0,177) width 33: "reset "
-        RenderButton {INPUT} at (35,173) size 58x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        RenderText {#text} at (172,150) size 4x19
+          text run at (172,150) width 4: " "
+        RenderBR {BR} at (176,165) size 0x0
+        RenderText {#text} at (0,175) size 33x19
+          text run at (0,175) width 33: "reset "
+        RenderButton {INPUT} at (35,171) size 58x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
           RenderBlock (anonymous) at (8,4) size 42x19
             RenderText at (0,0) size 42x19
               text run at (0,0) width 42: "Reset"
-        RenderText {#text} at (95,177) size 4x19
-          text run at (95,177) width 4: " "
-        RenderBR {BR} at (99,192) size 0x0
-        RenderText {#text} at (0,209) size 46x19
-          text run at (0,209) width 46: "submit "
-        RenderButton {INPUT} at (48,205) size 66x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
+        RenderText {#text} at (95,175) size 4x19
+          text run at (95,175) width 4: " "
+        RenderBR {BR} at (99,190) size 0x0
+        RenderText {#text} at (0,207) size 46x19
+          text run at (0,207) width 46: "submit "
+        RenderButton {INPUT} at (48,203) size 66x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
           RenderBlock (anonymous) at (8,4) size 50x19
             RenderText at (0,0) size 50x19
               text run at (0,0) width 50: "Submit"
-        RenderText {#text} at (116,209) size 4x19
-          text run at (116,209) width 4: " "
-        RenderBR {BR} at (120,224) size 0x0
-        RenderText {#text} at (0,240) size 49x19
-          text run at (0,240) width 49: "isindex "
-        RenderTextControl {INPUT} at (51,237) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-        RenderText {#text} at (247,240) size 4x19
-          text run at (247,240) width 4: " "
-        RenderBR {BR} at (251,255) size 0x0
-        RenderText {#text} at (0,269) size 64x19
-          text run at (0,269) width 64: "password "
-        RenderTextControl {INPUT} at (66,266) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-        RenderText {#text} at (262,269) size 4x19
-          text run at (262,269) width 4: " "
-        RenderBR {BR} at (266,284) size 0x0
-        RenderText {#text} at (0,298) size 44x19
-          text run at (0,298) width 44: "search "
-        RenderTextControl {INPUT} at (46,295) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (116,207) size 4x19
+          text run at (116,207) width 4: " "
+        RenderBR {BR} at (120,222) size 0x0
+        RenderText {#text} at (0,238) size 49x19
+          text run at (0,238) width 49: "isindex "
+        RenderTextControl {INPUT} at (51,235) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (247,238) size 4x19
+          text run at (247,238) width 4: " "
+        RenderBR {BR} at (251,253) size 0x0
+        RenderText {#text} at (0,267) size 64x19
+          text run at (0,267) width 64: "password "
+        RenderTextControl {INPUT} at (66,264) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (262,267) size 4x19
+          text run at (262,267) width 4: " "
+        RenderBR {BR} at (266,282) size 0x0
+        RenderText {#text} at (0,296) size 44x19
+          text run at (0,296) width 44: "search "
+        RenderTextControl {INPUT} at (46,293) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
           RenderBlock {DIV} at (3,2) size 188x20
             RenderBlock {DIV} at (0,16) size 0x0
             RenderBlock {DIV} at (172,0) size 16x16
@@ -95,9 +95,9 @@ layer at (49,32) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
 layer at (40,61) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
-layer at (62,267) size 188x19
+layer at (62,265) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
-layer at (77,296) size 188x19
+layer at (77,294) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
-layer at (57,325) size 172x19
+layer at (57,323) size 172x19
   RenderBlock {DIV} at (0,1) size 172x19
diff --git a/LayoutTests/platform/gtk/fast/forms/input-value-expected.txt b/LayoutTests/platform/gtk/fast/forms/input-value-expected.txt
index 1384b7b..8ae495f 100644
--- a/LayoutTests/platform/gtk/fast/forms/input-value-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/input-value-expected.txt
@@ -1,8 +1,8 @@
-layer at (0,0) size 781x610
+layer at (0,0) size 781x604
   RenderView at (0,0) size 781x600
-layer at (0,0) size 781x610
-  RenderBlock {HTML} at (0,0) size 781x610
-    RenderBody {BODY} at (8,8) size 765x586
+layer at (0,0) size 781x604
+  RenderBlock {HTML} at (0,0) size 781x604
+    RenderBody {BODY} at (8,8) size 765x580
       RenderBlock {P} at (0,0) size 765x38
         RenderText {#text} at (0,0) size 750x38
           text run at (0,0) width 750: "Results that match WinIE are two columns on the right that say \"after\" every time, except for the last row which should"
@@ -11,8 +11,8 @@ layer at (0,0) size 781x610
         RenderText {#text} at (0,0) size 713x19
           text run at (0,0) width 713: "Results that match Gecko are like WinIE, but with \"before\" for the attribute in the first two rows and the last row."
       RenderBlock {HR} at (0,89) size 765x2 [border: (1px inset #000000)]
-      RenderBlock {FORM} at (0,99) size 765x487
-        RenderTable {TABLE} at (0,0) size 765x487
+      RenderBlock {FORM} at (0,99) size 765x481
+        RenderTable {TABLE} at (0,0) size 765x481
           RenderTableSection {THEAD} at (0,0) size 765x25
             RenderTableRow {TR} at (0,2) size 765x21
               RenderTableCell {TH} at (2,2) size 320x21 [r=0 c=0 rs=1 cs=1]
@@ -27,7 +27,7 @@ layer at (0,0) size 781x610
               RenderTableCell {TH} at (702,2) size 61x21 [r=0 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 59x19
                   text run at (1,1) width 59: "attribute"
-          RenderTableSection {TBODY} at (0,25) size 765x462
+          RenderTableSection {TBODY} at (0,25) size 765x456
             RenderTableRow {TR} at (0,2) size 765x31
               RenderTableCell {TD} at (2,7) size 320x21 [r=0 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 207x19
@@ -52,156 +52,156 @@ layer at (0,0) size 781x610
               RenderTableCell {TD} at (702,40) size 61x21 [r=1 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 40x19
                   text run at (1,1) width 40: "before"
-            RenderTableRow {TR} at (0,68) size 765x23
-              RenderTableCell {TD} at (2,69) size 320x21 [r=2 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,68) size 765x21
+              RenderTableCell {TD} at (2,68) size 320x21 [r=2 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 249x19
                   text run at (1,1) width 249: "check box with value property changed"
-              RenderTableCell {TD} at (324,68) size 312x23 [r=2 c=1 rs=1 cs=1]
-                RenderBlock {INPUT} at (5,4) size 15x15
-              RenderTableCell {TD} at (638,69) size 62x21 [r=2 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (324,68) size 312x21 [r=2 c=1 rs=1 cs=1]
+                RenderBlock {INPUT} at (5,4) size 13x13
+              RenderTableCell {TD} at (638,68) size 62x21 [r=2 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,69) size 61x21 [r=2 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,68) size 61x21 [r=2 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,93) size 765x21
-              RenderTableCell {TD} at (2,93) size 320x21 [r=3 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,91) size 765x21
+              RenderTableCell {TD} at (2,91) size 320x21 [r=3 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 227x19
                   text run at (1,1) width 227: "hidden with value property changed"
-              RenderTableCell {TD} at (324,102) size 312x2 [r=3 c=1 rs=1 cs=1]
-              RenderTableCell {TD} at (638,93) size 62x21 [r=3 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (324,100) size 312x2 [r=3 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (638,91) size 62x21 [r=3 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,93) size 61x21 [r=3 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,91) size 61x21 [r=3 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,116) size 765x34
-              RenderTableCell {TD} at (2,122) size 320x21 [r=4 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,114) size 765x34
+              RenderTableCell {TD} at (2,120) size 320x21 [r=4 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 224x19
                   text run at (1,1) width 224: "button with value property changed"
-              RenderTableCell {TD} at (324,116) size 312x34 [r=4 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (324,114) size 312x34 [r=4 c=1 rs=1 cs=1]
                 RenderButton {INPUT} at (3,3) size 47x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
                   RenderBlock (anonymous) at (8,4) size 31x19
                     RenderText at (0,0) size 31x19
                       text run at (0,0) width 31: "after"
-              RenderTableCell {TD} at (638,122) size 62x21 [r=4 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (638,120) size 62x21 [r=4 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,122) size 61x21 [r=4 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,120) size 61x21 [r=4 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,152) size 765x21
-              RenderTableCell {TD} at (2,152) size 320x21 [r=5 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,150) size 765x21
+              RenderTableCell {TD} at (2,150) size 320x21 [r=5 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 222x19
                   text run at (1,1) width 222: "image with value property changed"
-              RenderTableCell {TD} at (324,152) size 312x21 [r=5 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (324,150) size 312x21 [r=5 c=1 rs=1 cs=1]
                 RenderImage {INPUT} at (1,1) size 45x19
-              RenderTableCell {TD} at (638,152) size 62x21 [r=5 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (638,150) size 62x21 [r=5 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,152) size 61x21 [r=5 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,150) size 61x21 [r=5 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,175) size 765x23
-              RenderTableCell {TD} at (2,176) size 320x21 [r=6 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,173) size 765x21
+              RenderTableCell {TD} at (2,173) size 320x21 [r=6 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 216x19
                   text run at (1,1) width 216: "radio with value property changed"
-              RenderTableCell {TD} at (324,175) size 312x23 [r=6 c=1 rs=1 cs=1]
-                RenderBlock {INPUT} at (5,4) size 15x15
-              RenderTableCell {TD} at (638,176) size 62x21 [r=6 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (324,173) size 312x21 [r=6 c=1 rs=1 cs=1]
+                RenderBlock {INPUT} at (5,4) size 13x13
+              RenderTableCell {TD} at (638,173) size 62x21 [r=6 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,176) size 61x21 [r=6 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,173) size 61x21 [r=6 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,200) size 765x31
-              RenderTableCell {TD} at (2,205) size 320x21 [r=7 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,196) size 765x31
+              RenderTableCell {TD} at (2,201) size 320x21 [r=7 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 205x19
                   text run at (1,1) width 205: "text with value attribute changed"
-              RenderTableCell {TD} at (324,200) size 312x31 [r=7 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (324,196) size 312x31 [r=7 c=1 rs=1 cs=1]
                 RenderTextControl {INPUT} at (3,3) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-              RenderTableCell {TD} at (638,205) size 62x21 [r=7 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (638,201) size 62x21 [r=7 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,205) size 61x21 [r=7 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,201) size 61x21 [r=7 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,233) size 765x23
-              RenderTableCell {TD} at (2,234) size 320x21 [r=8 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,229) size 765x21
+              RenderTableCell {TD} at (2,229) size 320x21 [r=8 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 247x19
                   text run at (1,1) width 247: "check box with value attribute changed"
-              RenderTableCell {TD} at (324,233) size 312x23 [r=8 c=1 rs=1 cs=1]
-                RenderBlock {INPUT} at (5,4) size 15x15
-              RenderTableCell {TD} at (638,234) size 62x21 [r=8 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (324,229) size 312x21 [r=8 c=1 rs=1 cs=1]
+                RenderBlock {INPUT} at (5,4) size 13x13
+              RenderTableCell {TD} at (638,229) size 62x21 [r=8 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,234) size 61x21 [r=8 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,229) size 61x21 [r=8 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,258) size 765x40
-              RenderTableCell {TD} at (2,258) size 320x40 [r=9 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,252) size 765x40
+              RenderTableCell {TD} at (2,252) size 320x40 [r=9 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 314x38
                   text run at (1,1) width 314: "text with value property changed, then turned into"
                   text run at (1,20) width 65: "check box"
-              RenderTableCell {TD} at (324,266) size 312x23 [r=9 c=1 rs=1 cs=1]
-                RenderBlock {INPUT} at (5,4) size 15x15
-              RenderTableCell {TD} at (638,267) size 62x21 [r=9 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (324,261) size 312x21 [r=9 c=1 rs=1 cs=1]
+                RenderBlock {INPUT} at (5,4) size 13x13
+              RenderTableCell {TD} at (638,261) size 62x21 [r=9 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,267) size 61x21 [r=9 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,261) size 61x21 [r=9 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,300) size 765x40
-              RenderTableCell {TD} at (2,300) size 320x40 [r=10 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,294) size 765x40
+              RenderTableCell {TD} at (2,294) size 320x40 [r=10 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 284x38
                   text run at (1,1) width 284: "check box with value property changed, then"
                   text run at (1,20) width 95: "turned into text"
-              RenderTableCell {TD} at (324,304) size 312x31 [r=10 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (324,298) size 312x31 [r=10 c=1 rs=1 cs=1]
                 RenderTextControl {INPUT} at (3,3) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-              RenderTableCell {TD} at (638,309) size 62x21 [r=10 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (638,303) size 62x21 [r=10 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,309) size 61x21 [r=10 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,303) size 61x21 [r=10 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,342) size 765x40
-              RenderTableCell {TD} at (2,342) size 320x40 [r=11 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,336) size 765x40
+              RenderTableCell {TD} at (2,336) size 320x40 [r=11 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 312x38
                   text run at (1,1) width 312: "text with value attribute changed, then turned into"
                   text run at (1,20) width 65: "check box"
-              RenderTableCell {TD} at (324,350) size 312x23 [r=11 c=1 rs=1 cs=1]
-                RenderBlock {INPUT} at (5,4) size 15x15
-              RenderTableCell {TD} at (638,351) size 62x21 [r=11 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (324,345) size 312x21 [r=11 c=1 rs=1 cs=1]
+                RenderBlock {INPUT} at (5,4) size 13x13
+              RenderTableCell {TD} at (638,345) size 62x21 [r=11 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,351) size 61x21 [r=11 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,345) size 61x21 [r=11 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,384) size 765x40
-              RenderTableCell {TD} at (2,384) size 320x40 [r=12 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,378) size 765x40
+              RenderTableCell {TD} at (2,378) size 320x40 [r=12 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 282x38
                   text run at (1,1) width 282: "check box with value attribute changed, then"
                   text run at (1,20) width 95: "turned into text"
-              RenderTableCell {TD} at (324,388) size 312x31 [r=12 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (324,382) size 312x31 [r=12 c=1 rs=1 cs=1]
                 RenderTextControl {INPUT} at (3,3) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-              RenderTableCell {TD} at (638,393) size 62x21 [r=12 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (638,387) size 62x21 [r=12 c=2 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-              RenderTableCell {TD} at (702,393) size 61x21 [r=12 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (702,387) size 61x21 [r=12 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 28x19
                   text run at (1,1) width 28: "after"
-            RenderTableRow {TR} at (0,426) size 765x34
-              RenderTableCell {TD} at (2,432) size 320x21 [r=13 c=0 rs=1 cs=1]
+            RenderTableRow {TR} at (0,420) size 765x34
+              RenderTableCell {TD} at (2,426) size 320x21 [r=13 c=0 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 204x19
                   text run at (1,1) width 204: "file with value property changed"
-              RenderTableCell {TD} at (324,426) size 312x34 [r=13 c=1 rs=1 cs=1]
+              RenderTableCell {TD} at (324,420) size 312x34 [r=13 c=1 rs=1 cs=1]
                 RenderFileUploadControl {INPUT} at (3,3) size 306x28 "(None)"
                   RenderButton {INPUT} at (0,0) size 103x28 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
                     RenderBlock (anonymous) at (8,4) size 87x19
                       RenderText at (0,0) size 87x19
                         text run at (0,0) width 87: "Choose File"
-              RenderTableCell {TD} at (638,442) size 62x2 [r=13 c=2 rs=1 cs=1]
-              RenderTableCell {TD} at (702,432) size 61x21 [r=13 c=3 rs=1 cs=1]
+              RenderTableCell {TD} at (638,436) size 62x2 [r=13 c=2 rs=1 cs=1]
+              RenderTableCell {TD} at (702,426) size 61x21 [r=13 c=3 rs=1 cs=1]
                 RenderText {#text} at (1,1) size 40x19
                   text run at (1,1) width 40: "before"
 layer at (338,140) size 188x19
@@ -212,15 +212,15 @@ layer at (338,173) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
     RenderText {#text} at (1,0) size 36x19
       text run at (1,0) width 36: "\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}\x{2022}"
-layer at (338,338) size 188x19
+layer at (338,334) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
     RenderText {#text} at (1,0) size 31x19
       text run at (1,0) width 31: "after"
-layer at (338,442) size 188x19
+layer at (338,436) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
     RenderText {#text} at (1,0) size 31x19
       text run at (1,0) width 31: "after"
-layer at (338,526) size 188x19
+layer at (338,520) size 188x19
   RenderBlock {DIV} at (3,3) size 188x19
     RenderText {#text} at (1,0) size 31x19
       text run at (1,0) width 31: "after"
diff --git a/LayoutTests/platform/gtk/fast/forms/radio-attr-order-expected.txt b/LayoutTests/platform/gtk/fast/forms/radio-attr-order-expected.txt
index 5afa9d4..a46dee3 100644
--- a/LayoutTests/platform/gtk/fast/forms/radio-attr-order-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/radio-attr-order-expected.txt
@@ -3,17 +3,17 @@ layer 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 784x78
+      RenderBlock (anonymous) at (0,0) size 784x77
         RenderText {#text} at (0,0) size 744x19
           text run at (0,0) width 744: "This tests that radio buttons are checked by default, even when the name attribute is parsed after the checked attribute. "
         RenderBR {BR} at (744,15) size 0x0
         RenderBR {BR} at (0,19) size 0x19
-        RenderBlock {INPUT} at (4,41) size 15x15
-        RenderText {#text} at (23,39) size 300x19
-          text run at (23,39) width 300: "This radio button should be checked by default "
-        RenderBR {BR} at (323,54) size 0x0
-        RenderBR {BR} at (0,59) size 0x19
-      RenderBlock {DIV} at (0,78) size 784x19
+        RenderBlock {INPUT} at (4,42) size 13x13
+        RenderText {#text} at (21,38) size 300x19
+          text run at (21,38) width 300: "This radio button should be checked by default "
+        RenderBR {BR} at (321,53) size 0x0
+        RenderBR {BR} at (0,58) size 0x19
+      RenderBlock {DIV} at (0,77) size 784x19
         RenderText {#text} at (0,0) size 301x19
           text run at (0,0) width 82: "Test Passed. "
           text run at (82,0) width 219: "Radio button is checked by default"
diff --git a/LayoutTests/platform/gtk/fast/forms/radio-nested-labels-expected.txt b/LayoutTests/platform/gtk/fast/forms/radio-nested-labels-expected.txt
index 757bb60..72be37a 100644
--- a/LayoutTests/platform/gtk/fast/forms/radio-nested-labels-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/radio-nested-labels-expected.txt
@@ -8,29 +8,29 @@ layer at (0,0) size 800x600
           text run at (0,0) width 595: "This tests our ability to correctly select radio buttons when we have nested label tags. This test "
           text run at (595,0) width 87: "only works in"
           text run at (0,19) width 534: "DumpRenderTree. It can be tested manually outside of DRT just by clicking around."
-      RenderBlock {FORM} at (0,54) size 784x40
-        RenderBlock (anonymous) at (0,0) size 784x21
-          RenderBlock {INPUT} at (4,3) size 15x15
-          RenderInline {LABEL} at (0,0) size 185x19
-            RenderText {#text} at (23,1) size 27x19
-              text run at (23,1) width 27: "one "
-            RenderBlock {INPUT} at (54,3) size 15x15
-            RenderInline {LABEL} at (0,0) size 135x19
-              RenderText {#text} at (73,1) size 28x19
-                text run at (73,1) width 28: "two "
-              RenderBlock {INPUT} at (105,3) size 15x15
-              RenderInline {LABEL} at (0,0) size 84x19
-                RenderText {#text} at (124,1) size 35x19
-                  text run at (124,1) width 35: "three "
-                RenderBlock {INPUT} at (163,3) size 15x15
+      RenderBlock {FORM} at (0,54) size 784x39
+        RenderBlock (anonymous) at (0,0) size 784x20
+          RenderBlock {INPUT} at (4,4) size 13x13
+          RenderInline {LABEL} at (0,0) size 179x19
+            RenderText {#text} at (21,0) size 27x19
+              text run at (21,0) width 27: "one "
+            RenderBlock {INPUT} at (52,4) size 13x13
+            RenderInline {LABEL} at (0,0) size 131x19
+              RenderText {#text} at (69,0) size 28x19
+                text run at (69,0) width 28: "two "
+              RenderBlock {INPUT} at (101,4) size 13x13
+              RenderInline {LABEL} at (0,0) size 82x19
+                RenderText {#text} at (118,0) size 35x19
+                  text run at (118,0) width 35: "three "
+                RenderBlock {INPUT} at (157,4) size 13x13
                 RenderInline {LABEL} at (0,0) size 26x19
-                  RenderText {#text} at (182,1) size 26x19
-                    text run at (182,1) width 26: "four"
-        RenderBlock (anonymous) at (0,21) size 784x19
+                  RenderText {#text} at (174,0) size 26x19
+                    text run at (174,0) width 26: "four"
+        RenderBlock (anonymous) at (0,20) size 784x19
           RenderBlock {DIV} at (0,0) size 784x19
             RenderText {#text} at (0,0) size 104x19
               text run at (0,0) width 104: "Test Succeeded!"
-        RenderBlock (anonymous) at (0,40) size 784x0
+        RenderBlock (anonymous) at (0,39) size 784x0
           RenderInline {LABEL} at (0,0) size 0x0
             RenderInline {LABEL} at (0,0) size 0x0
               RenderInline {LABEL} at (0,0) size 0x0
diff --git a/LayoutTests/platform/gtk/fast/forms/radio_checked-expected.txt b/LayoutTests/platform/gtk/fast/forms/radio_checked-expected.txt
index aebfd99..ce8084a 100644
--- a/LayoutTests/platform/gtk/fast/forms/radio_checked-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/radio_checked-expected.txt
@@ -6,49 +6,49 @@ layer at (0,0) size 800x600
       RenderBlock {P} at (0,0) size 784x19
         RenderText {#text} at (0,0) size 502x19
           text run at (0,0) width 502: "This test should make sure that only one button per group, per form, is checked."
-      RenderBlock (anonymous) at (0,35) size 784x21
-        RenderText {#text} at (0,1) size 322x19
-          text run at (0,1) width 322: "These buttons are in group1 but don't have a form. "
-        RenderBlock {INPUT} at (326,3) size 15x15
-        RenderText {#text} at (345,1) size 4x19
-          text run at (345,1) width 4: " "
-        RenderBlock {INPUT} at (353,3) size 15x15
+      RenderBlock (anonymous) at (0,35) size 784x20
+        RenderText {#text} at (0,0) size 322x19
+          text run at (0,0) width 322: "These buttons are in group1 but don't have a form. "
+        RenderBlock {INPUT} at (326,4) size 13x13
+        RenderText {#text} at (343,0) size 4x19
+          text run at (343,0) width 4: " "
+        RenderBlock {INPUT} at (351,4) size 13x13
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {FORM} at (0,56) size 784x61
+      RenderBlock {FORM} at (0,55) size 784x59
         RenderBR {BR} at (0,0) size 0x19
-        RenderText {#text} at (0,20) size 289x19
-          text run at (0,20) width 289: "These buttons are in group1, in the first form. "
-        RenderBlock {INPUT} at (293,22) size 15x15
-        RenderText {#text} at (312,20) size 4x19
-          text run at (312,20) width 4: " "
-        RenderBlock {INPUT} at (320,22) size 15x15
-        RenderText {#text} at (339,20) size 4x19
-          text run at (339,20) width 4: " "
+        RenderText {#text} at (0,19) size 289x19
+          text run at (0,19) width 289: "These buttons are in group1, in the first form. "
+        RenderBlock {INPUT} at (293,23) size 13x13
+        RenderText {#text} at (310,19) size 4x19
+          text run at (310,19) width 4: " "
+        RenderBlock {INPUT} at (318,23) size 13x13
+        RenderText {#text} at (335,19) size 4x19
+          text run at (335,19) width 4: " "
         RenderBR {BR} at (0,0) size 0x0
-        RenderText {#text} at (0,41) size 289x19
-          text run at (0,41) width 289: "These buttons are in group2, in the first form. "
-        RenderBlock {INPUT} at (293,43) size 15x15
-        RenderText {#text} at (312,41) size 4x19
-          text run at (312,41) width 4: " "
-        RenderBlock {INPUT} at (320,43) size 15x15
+        RenderText {#text} at (0,39) size 289x19
+          text run at (0,39) width 289: "These buttons are in group2, in the first form. "
+        RenderBlock {INPUT} at (293,43) size 13x13
+        RenderText {#text} at (310,39) size 4x19
+          text run at (310,39) width 4: " "
+        RenderBlock {INPUT} at (318,43) size 13x13
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock (anonymous) at (0,133) size 784x21
-        RenderText {#text} at (0,1) size 322x19
-          text run at (0,1) width 322: "These buttons are in group1 but don't have a form. "
-        RenderBlock {INPUT} at (326,3) size 15x15
-        RenderText {#text} at (345,1) size 4x19
-          text run at (345,1) width 4: " "
-        RenderBlock {INPUT} at (353,3) size 15x15
+      RenderBlock (anonymous) at (0,130) size 784x20
+        RenderText {#text} at (0,0) size 322x19
+          text run at (0,0) width 322: "These buttons are in group1 but don't have a form. "
+        RenderBlock {INPUT} at (326,4) size 13x13
+        RenderText {#text} at (343,0) size 4x19
+          text run at (343,0) width 4: " "
+        RenderBlock {INPUT} at (351,4) size 13x13
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {FORM} at (0,154) size 784x40
+      RenderBlock {FORM} at (0,150) size 784x39
         RenderBR {BR} at (0,0) size 0x19
-        RenderText {#text} at (0,20) size 309x19
-          text run at (0,20) width 309: "These buttons are in group2, in the second form. "
-        RenderBlock {INPUT} at (313,22) size 15x15
-        RenderText {#text} at (332,20) size 4x19
-          text run at (332,20) width 4: " "
-        RenderBlock {INPUT} at (340,22) size 15x15
+        RenderText {#text} at (0,19) size 309x19
+          text run at (0,19) width 309: "These buttons are in group2, in the second form. "
+        RenderBlock {INPUT} at (313,23) size 13x13
+        RenderText {#text} at (330,19) size 4x19
+          text run at (330,19) width 4: " "
+        RenderBlock {INPUT} at (338,23) size 13x13
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,210) size 784x19
+      RenderBlock {DIV} at (0,205) size 784x19
         RenderText {#text} at (0,0) size 108x19
           text run at (0,0) width 108: "TEST PASSED."
diff --git a/LayoutTests/platform/gtk/fast/forms/radio_checked_dynamic-expected.txt b/LayoutTests/platform/gtk/fast/forms/radio_checked_dynamic-expected.txt
index d506685..44e2874 100644
--- a/LayoutTests/platform/gtk/fast/forms/radio_checked_dynamic-expected.txt
+++ b/LayoutTests/platform/gtk/fast/forms/radio_checked_dynamic-expected.txt
@@ -12,50 +12,50 @@ layer at (0,0) size 800x600
           text run at (0,38) width 346: "Test 1: Transfer radio buttons from <body> to <form>:"
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {FORM} at (0,57) size 784x21
-        RenderBlock {INPUT} at (4,3) size 15x15
-        RenderBlock {INPUT} at (27,3) size 15x15
-      RenderBlock {DIV} at (0,94) size 784x19
+      RenderBlock {FORM} at (0,57) size 784x19
+        RenderBlock {INPUT} at (4,3) size 13x13
+        RenderBlock {INPUT} at (25,3) size 13x13
+      RenderBlock {DIV} at (0,92) size 784x19
         RenderText {#text} at (0,0) size 91x19
           text run at (0,0) width 91: "Test 1 Passed"
-      RenderBlock (anonymous) at (0,113) size 784x38
+      RenderBlock (anonymous) at (0,111) size 784x38
         RenderBR {BR} at (0,0) size 0x19
         RenderText {#text} at (0,19) size 346x19
           text run at (0,19) width 346: "Test 2: Transfer radio buttons from <form> to <body>:"
-      RenderBlock {FORM} at (0,151) size 784x0
+      RenderBlock {FORM} at (0,149) size 784x0
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,167) size 784x19
+      RenderBlock {DIV} at (0,165) size 784x19
         RenderText {#text} at (0,0) size 91x19
           text run at (0,0) width 91: "Test 2 Passed"
-      RenderBlock (anonymous) at (0,186) size 784x38
+      RenderBlock (anonymous) at (0,184) size 784x38
         RenderBR {BR} at (0,0) size 0x19
         RenderText {#text} at (0,19) size 563x19
           text run at (0,19) width 563: "Test 3: Transfer radio buttons from <form> to <body> with a dormant state in the middle:"
-      RenderBlock {FORM} at (0,224) size 784x0
+      RenderBlock {FORM} at (0,222) size 784x0
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,240) size 784x19
+      RenderBlock {DIV} at (0,238) size 784x19
         RenderText {#text} at (0,0) size 91x19
           text run at (0,0) width 91: "Test 3 Passed"
-      RenderBlock (anonymous) at (0,259) size 784x38
+      RenderBlock (anonymous) at (0,257) size 784x38
         RenderBR {BR} at (0,0) size 0x19
         RenderText {#text} at (0,19) size 254x19
           text run at (0,19) width 254: "Test 4: Transfer from <form> to <form>"
-      RenderBlock {FORM} at (0,297) size 784x0
+      RenderBlock {FORM} at (0,295) size 784x0
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {FORM} at (0,313) size 784x21
-        RenderBlock {INPUT} at (4,3) size 15x15
-        RenderText {#text} at (23,1) size 4x19
-          text run at (23,1) width 4: " "
-        RenderBlock {INPUT} at (31,3) size 15x15
-        RenderBlock {INPUT} at (54,3) size 15x15
-      RenderBlock {DIV} at (0,350) size 784x19
+      RenderBlock {FORM} at (0,311) size 784x20
+        RenderBlock {INPUT} at (4,4) size 13x13
+        RenderText {#text} at (21,0) size 4x19
+          text run at (21,0) width 4: " "
+        RenderBlock {INPUT} at (29,4) size 13x13
+        RenderBlock {INPUT} at (50,4) size 13x13
+      RenderBlock {DIV} at (0,347) size 784x19
         RenderText {#text} at (0,0) size 91x19
           text run at (0,0) width 91: "Test 4 Passed"
-      RenderBlock (anonymous) at (0,369) size 784x21
-        RenderBlock {INPUT} at (4,3) size 15x15
-        RenderBlock {INPUT} at (27,3) size 15x15
-        RenderBlock {INPUT} at (50,3) size 15x15
-        RenderBlock {INPUT} at (73,3) size 15x15
+      RenderBlock (anonymous) at (0,366) size 784x19
+        RenderBlock {INPUT} at (4,3) size 13x13
+        RenderBlock {INPUT} at (25,3) size 13x13
+        RenderBlock {INPUT} at (46,3) size 13x13
+        RenderBlock {INPUT} at (67,3) size 13x13
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 24d561d..853344e 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,38 @@
+2011-01-11  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Gustavo Noronha Silva.
+
+        [GTK] Move toggle button rendering out of gtk2drawing.c
+        https://bugs.webkit.org/show_bug.cgi?id=52258
+
+        * platform/gtk/RenderThemeGtk.h:
+        * platform/gtk/RenderThemeGtk2.cpp:
+        (WebCore::RenderThemeGtk::platformInit): Initialize new button members.
+        (WebCore::adjustRectForFocus): Added this function which inflates a rect based
+        on a widget's exterior focus.
+        (WebCore::RenderThemeGtk::adjustRepaintRect): Account for exterior focus.
+        (WebCore::setToggleSize): Only listen to indicator-size to properly size
+        checkboxes and radio buttons.
+        (WebCore::RenderThemeGtk::setCheckboxSize): Call new setToggleSize properly.
+        (WebCore::paintToggle): Added.
+        (WebCore::RenderThemeGtk::paintCheckbox): Call paintToggle.
+        (WebCore::RenderThemeGtk::setRadioSize): Call new setToggleSize properly.
+        (WebCore::RenderThemeGtk::paintRadio): Call paintToggle.
+        (WebCore::RenderThemeGtk::gtkRadioButton): Added.
+        (WebCore::RenderThemeGtk::gtkCheckButton): Added.
+        * platform/gtk/WidgetRenderingContext.cpp:
+        (WebCore::WidgetRenderingContext::WidgetRenderingContext): Use a static extra space
+        variable. This is good enough for all themes that I've tested and prevents having to
+        pass information from RenderThemeGtk about every single type of widget.
+        (WebCore::WidgetRenderingContext::gtkPaintFocus): Use the paintRect
+        to draw instead of m_paintRect. This is important when we're painting
+        something that isn't the size of the total rect.
+        (WebCore::WidgetRenderingContext::gtkPaintCheck): Added.
+        (WebCore::WidgetRenderingContext::gtkPaintOption): Added.
+        * platform/gtk/WidgetRenderingContext.h: Updated to reflect new methods.
+        * platform/gtk/gtkdrawing.h: Remove newly unused code.
+        * platform/gtk/gtk2drawing.c: Ditto.
+
 2011-01-19  Tony Gentilcore  <tonyg at chromium.org>
 
         Unreviewed build fix.
diff --git a/Source/WebCore/platform/gtk/RenderThemeGtk.h b/Source/WebCore/platform/gtk/RenderThemeGtk.h
index 90113e5..65d9366 100644
--- a/Source/WebCore/platform/gtk/RenderThemeGtk.h
+++ b/Source/WebCore/platform/gtk/RenderThemeGtk.h
@@ -195,6 +195,9 @@ private:
     GtkWidget* gtkVScale() const;
     GtkWidget* gtkHScale() const;
     GtkWidget* gtkContainer() const;
+    GtkWidget* gtkRadioButton() const;
+    GtkWidget* gtkCheckButton() const;
+
     mutable GtkWidget* m_gtkWindow;
     mutable GtkWidget* m_gtkContainer;
     mutable GtkWidget* m_gtkButton;
@@ -202,6 +205,9 @@ private:
     mutable GtkWidget* m_gtkTreeView;
     mutable GtkWidget* m_gtkVScale;
     mutable GtkWidget* m_gtkHScale;
+    mutable GtkWidget* m_gtkRadioButton;
+    mutable GtkWidget* m_gtkCheckButton;
+
     bool m_themePartsHaveRGBAColormap;
     friend class WidgetRenderingContext;
 #endif
diff --git a/Source/WebCore/platform/gtk/RenderThemeGtk2.cpp b/Source/WebCore/platform/gtk/RenderThemeGtk2.cpp
index e01508e..e917816 100644
--- a/Source/WebCore/platform/gtk/RenderThemeGtk2.cpp
+++ b/Source/WebCore/platform/gtk/RenderThemeGtk2.cpp
@@ -61,6 +61,8 @@ void RenderThemeGtk::platformInit()
     m_gtkTreeView = 0;
     m_gtkVScale = 0;
     m_gtkHScale = 0;
+    m_gtkRadioButton = 0;
+    m_gtkCheckButton = 0;
 
     memset(&m_themeParts, 0, sizeof(GtkThemeParts));
     GdkColormap* colormap = gdk_screen_get_rgba_colormap(gdk_screen_get_default());
@@ -99,8 +101,34 @@ void RenderThemeGtk::initMediaColors()
 }
 #endif
 
-void RenderThemeGtk::adjustRepaintRect(const RenderObject*, IntRect&)
+static void adjustRectForFocus(GtkWidget* widget, IntRect& rect, bool ignoreInteriorFocusProperty = false)
 {
+    gint focusWidth, focusPad;
+    gboolean interiorFocus = 0;
+    gtk_widget_style_get(widget,
+                         "interior-focus", &interiorFocus,
+                         "focus-line-width", &focusWidth,
+                         "focus-padding", &focusPad, NULL);
+    if (!ignoreInteriorFocusProperty && interiorFocus)
+        return;
+    rect.inflate(focusWidth + focusPad);
+}
+
+void RenderThemeGtk::adjustRepaintRect(const RenderObject* renderObject, IntRect& rect)
+{
+    ControlPart part = renderObject->style()->appearance();
+    switch (part) {
+    case CheckboxPart:
+    case RadioPart: {
+        // We ignore the interior focus property and always expand the focus rect. In GTK+, the
+        // focus indicator is usually on the text next to a checkbox or radio button, but that doesn't
+        // happen in WebCore. By expanding the focus rectangle unconditionally we increase its prominence.
+        adjustRectForFocus(part == CheckboxPart ? gtkCheckButton() : gtkRadioButton(), rect, true);
+        return;
+    }
+    default:
+        return;
+    }
 }
 
 static GtkStateType getGtkStateType(RenderThemeGtk* theme, RenderObject* object)
@@ -142,56 +170,77 @@ bool RenderThemeGtk::paintRenderObject(GtkThemeWidgetType type, RenderObject* re
                                              gtkTextDirection(renderObject->style()->direction()));
 }
 
-void RenderThemeGtk::getIndicatorMetrics(ControlPart part, int& indicatorSize, int& indicatorSpacing)
+static void setToggleSize(const RenderThemeGtk* theme, RenderStyle* style, GtkWidget* widget)
 {
-    ASSERT(part == CheckboxPart || part == RadioPart);
-    if (part == CheckboxPart) {
-        moz_gtk_checkbox_get_metrics(&indicatorSize, &indicatorSpacing);
+    // The width and height are both specified, so we shouldn't change them.
+    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
         return;
-    }
 
-    // RadioPart
-    moz_gtk_radio_get_metrics(&indicatorSize, &indicatorSpacing);
+    gint indicatorSize;
+    gtk_widget_style_get(widget, "indicator-size", &indicatorSize, NULL);
+    if (style->width().isIntrinsicOrAuto())
+        style->setWidth(Length(indicatorSize, Fixed));
+    if (style->height().isAuto())
+        style->setHeight(Length(indicatorSize, Fixed));
 }
 
-static void setToggleSize(const RenderThemeGtk* theme, RenderStyle* style, ControlPart appearance)
+static void paintToggle(RenderThemeGtk* theme, RenderObject* renderObject, const PaintInfo& info, const IntRect& rect, GtkWidget* widget)
 {
-    // The width and height are both specified, so we shouldn't change them.
-    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
-        return;
+    // We do not call gtk_toggle_button_set_active here, because some themes begin a series of
+    // animation frames in a "toggled" signal handler. This puts some checkboxes in a half-way
+    // checked state. Every GTK+ theme I tested merely looks at the shadow type (and not the
+    // 'active' property) to determine whether or not to draw the check.
+    gtk_widget_set_sensitive(widget, theme->isEnabled(renderObject) && !theme->isReadOnlyControl(renderObject));
+    gtk_widget_set_direction(widget, gtkTextDirection(renderObject->style()->direction()));
 
-    // FIXME: This is probably not correct use of indicatorSize and indicatorSpacing.
-    gint indicatorSize, indicatorSpacing;
-    RenderThemeGtk::getIndicatorMetrics(appearance, indicatorSize, indicatorSpacing);
+    bool indeterminate = theme->isIndeterminate(renderObject);
+    gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(widget), indeterminate);
 
-    // Other ports hard-code this to 13, but GTK+ users tend to demand the native look.
-    // It could be made a configuration option values other than 13 actually break site compatibility.
-    int length = indicatorSize + indicatorSpacing;
-    if (style->width().isIntrinsicOrAuto())
-        style->setWidth(Length(length, Fixed));
+    GtkShadowType shadowType = GTK_SHADOW_OUT;
+    if (indeterminate) // This originates from the Mozilla code.
+        shadowType = GTK_SHADOW_ETCHED_IN;
+    else if (theme->isChecked(renderObject))
+        shadowType = GTK_SHADOW_IN;
 
-    if (style->height().isAuto())
-        style->setHeight(Length(length, Fixed));
+    WidgetRenderingContext widgetContext(info.context, rect);
+    IntRect buttonRect(IntPoint(), rect.size());
+    GtkStateType toggleState = getGtkStateType(theme, renderObject);
+    const char* detail = 0;
+    if (GTK_IS_RADIO_BUTTON(widget)) {
+        detail = "radiobutton";
+        widgetContext.gtkPaintOption(buttonRect, widget, toggleState, shadowType, detail);
+    } else {
+        detail = "checkbutton";
+        widgetContext.gtkPaintCheck(buttonRect, widget, toggleState, shadowType, detail);
+    }
+
+    if (theme->isFocused(renderObject)) {
+        IntRect focusRect(buttonRect);
+        adjustRectForFocus(widget, focusRect, true);
+        widgetContext.gtkPaintFocus(focusRect, widget, toggleState, detail);
+    }
 }
 
 void RenderThemeGtk::setCheckboxSize(RenderStyle* style) const
 {
-    setToggleSize(this, style, RadioPart);
+    setToggleSize(this, style, gtkCheckButton());
 }
 
-bool RenderThemeGtk::paintCheckbox(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+bool RenderThemeGtk::paintCheckbox(RenderObject* renderObject, const PaintInfo& info, const IntRect& rect)
 {
-    return paintRenderObject(MOZ_GTK_CHECKBUTTON, object, info.context, rect, isChecked(object));
+    paintToggle(this, renderObject, info, rect, gtkCheckButton());
+    return false;
 }
 
 void RenderThemeGtk::setRadioSize(RenderStyle* style) const
 {
-    setToggleSize(this, style, RadioPart);
+    setToggleSize(this, style, gtkRadioButton());
 }
 
-bool RenderThemeGtk::paintRadio(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+bool RenderThemeGtk::paintRadio(RenderObject* renderObject, const PaintInfo& info, const IntRect& rect)
 {
-    return paintRenderObject(MOZ_GTK_RADIOBUTTON, object, info.context, rect, isChecked(object));
+    paintToggle(this, renderObject, info, rect, gtkRadioButton());
+    return false;
 }
 
 bool RenderThemeGtk::paintButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
@@ -573,6 +622,24 @@ GtkWidget* RenderThemeGtk::gtkHScale() const
     return m_gtkHScale;
 }
 
+GtkWidget* RenderThemeGtk::gtkRadioButton() const
+{
+    if (m_gtkRadioButton)
+        return m_gtkRadioButton;
+    m_gtkRadioButton = gtk_radio_button_new(0);
+    setupWidgetAndAddToContainer(m_gtkRadioButton, gtkContainer());
+    return m_gtkRadioButton;
+}
+
+GtkWidget* RenderThemeGtk::gtkCheckButton() const
+{
+    if (m_gtkCheckButton)
+        return m_gtkCheckButton;
+    m_gtkCheckButton = gtk_check_button_new();
+    setupWidgetAndAddToContainer(m_gtkCheckButton, gtkContainer());
+    return m_gtkCheckButton;
+}
+
 GtkWidget* RenderThemeGtk::gtkScrollbar()
 {
     return moz_gtk_get_scrollbar_widget();
diff --git a/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp b/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp
index 6d1be31..1f1437a 100644
--- a/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp
+++ b/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp
@@ -65,21 +65,6 @@ static void scheduleScratchBufferPurge()
     purgeScratchBufferTimer.startOneShot(2);
 }
 
-static IntSize getExtraSpaceForWidget(RenderThemeGtk* theme)
-{
-    // Checkboxes and scrollbar thumbs often draw outside their boundaries. Here we figure out
-    // the maximum amount of space we need for any type of widget and use that to increase the
-    // size of the scratch buffer, while preserving the final widget position.
-
-    // The checkbox extra space is calculated by looking at the widget style.
-    int indicatorSize, indicatorSpacing;
-    theme->getIndicatorMetrics(CheckboxPart, indicatorSize, indicatorSpacing);
-    IntSize extraSpace(indicatorSpacing, indicatorSpacing);
-
-    // Scrollbar thumbs need at least an extra pixel along their movement axis.
-    return extraSpace.expandedTo(IntSize(1, 1));
-}
-
 WidgetRenderingContext::WidgetRenderingContext(GraphicsContext* graphicsContext, const IntRect& targetRect)
     : m_graphicsContext(graphicsContext)
     , m_targetRect(targetRect)
@@ -96,8 +81,9 @@ WidgetRenderingContext::WidgetRenderingContext(GraphicsContext* graphicsContext,
         return;
     }
 
-    // Some widgets render outside their rectangles. We need to account for this.
-    m_extraSpace = getExtraSpaceForWidget(theme);
+    // Widgets sometimes need to draw outside their boundaries for things such as
+    // exterior focus. We want to allocate a some extra pixels in our surface for this.
+    m_extraSpace = IntSize(15, 15);
 
     // Offset the target rectangle so that the extra space is within the boundaries of the scratch buffer.
     m_paintRect = IntRect(IntPoint(m_extraSpace.width(), m_extraSpace.height()),
@@ -176,7 +162,7 @@ void WidgetRenderingContext::gtkPaintBox(const IntRect& rect, GtkWidget* widget,
 void WidgetRenderingContext::gtkPaintFocus(const IntRect& rect, GtkWidget* widget, GtkStateType stateType, const gchar* detail)
 {
     GdkRectangle paintRect = { m_paintRect.x + rect.x(), m_paintRect.y + rect.y(), rect.width(), rect.height() };
-    gtk_paint_focus(gtk_widget_get_style(widget), m_target, stateType, &m_paintRect, widget,
+    gtk_paint_focus(gtk_widget_get_style(widget), m_target, stateType, &paintRect, widget,
                     detail, paintRect.x, paintRect.y, paintRect.width, paintRect.height);
 }
 
@@ -187,6 +173,20 @@ void WidgetRenderingContext::gtkPaintSlider(const IntRect& rect, GtkWidget* widg
                      detail, paintRect.x, paintRect.y, paintRect.width, paintRect.height, orientation);
 }
 
+void WidgetRenderingContext::gtkPaintCheck(const IntRect& rect, GtkWidget* widget, GtkStateType stateType, GtkShadowType shadowType, const gchar* detail)
+{
+    GdkRectangle paintRect = { m_paintRect.x + rect.x(), m_paintRect.y + rect.y(), rect.width(), rect.height() };
+    gtk_paint_check(gtk_widget_get_style(widget), m_target, stateType, shadowType, &paintRect, widget,
+                    detail, paintRect.x, paintRect.y, paintRect.width, paintRect.height);
+}
+
+void WidgetRenderingContext::gtkPaintOption(const IntRect& rect, GtkWidget* widget, GtkStateType stateType, GtkShadowType shadowType, const gchar* detail)
+{
+    GdkRectangle paintRect = { m_paintRect.x + rect.x(), m_paintRect.y + rect.y(), rect.width(), rect.height() };
+    gtk_paint_option(gtk_widget_get_style(widget), m_target, stateType, shadowType, &paintRect, widget,
+                     detail, paintRect.x, paintRect.y, paintRect.width, paintRect.height);
+}
+
 }
 
 #endif // GTK_API_VERSION_2
diff --git a/Source/WebCore/platform/gtk/WidgetRenderingContext.h b/Source/WebCore/platform/gtk/WidgetRenderingContext.h
index 8b2a0e2..90c3269 100644
--- a/Source/WebCore/platform/gtk/WidgetRenderingContext.h
+++ b/Source/WebCore/platform/gtk/WidgetRenderingContext.h
@@ -41,6 +41,8 @@ public:
     void gtkPaintBox(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
     void gtkPaintFocus(const IntRect&, GtkWidget*, GtkStateType, const gchar*);
     void gtkPaintSlider(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*, GtkOrientation);
+    void gtkPaintCheck(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
+    void gtkPaintOption(const IntRect&, GtkWidget*, GtkStateType, GtkShadowType, const gchar*);
 
 private:
     GraphicsContext* m_graphicsContext;
diff --git a/Source/WebCore/platform/gtk/gtk2drawing.c b/Source/WebCore/platform/gtk/gtk2drawing.c
index 3ebd332..8dc601a 100644
--- a/Source/WebCore/platform/gtk/gtk2drawing.c
+++ b/Source/WebCore/platform/gtk/gtk2drawing.c
@@ -151,26 +151,6 @@ ensure_button_arrow_widget()
 }
 
 static gint
-ensure_checkbox_widget()
-{
-    if (!gParts->checkboxWidget) {
-        gParts->checkboxWidget = gtk_check_button_new_with_label("M");
-        setup_widget_prototype(gParts->checkboxWidget);
-    }
-    return MOZ_GTK_SUCCESS;
-}
-
-static gint
-ensure_radiobutton_widget()
-{
-    if (!gParts->radiobuttonWidget) {
-        gParts->radiobuttonWidget = gtk_radio_button_new_with_label(NULL, "M");
-        setup_widget_prototype(gParts->radiobuttonWidget);
-    }
-    return MOZ_GTK_SUCCESS;
-}
-
-static gint
 ensure_scrollbar_widget()
 {
     if (!gParts->vertScrollbarWidget) {
@@ -458,32 +438,6 @@ moz_gtk_init()
 }
 
 gint
-moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing)
-{
-    ensure_checkbox_widget();
-
-    gtk_widget_style_get (gParts->checkboxWidget,
-                          "indicator_size", indicator_size,
-                          "indicator_spacing", indicator_spacing,
-                          NULL);
-
-    return MOZ_GTK_SUCCESS;
-}
-
-gint
-moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing)
-{
-    ensure_radiobutton_widget();
-
-    gtk_widget_style_get (gParts->radiobuttonWidget,
-                          "indicator_size", indicator_size,
-                          "indicator_spacing", indicator_spacing,
-                          NULL);
-
-    return MOZ_GTK_SUCCESS;
-}
-
-gint
 moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus,
                          gint* focus_width, gint* focus_pad) 
 {
@@ -515,89 +469,6 @@ moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border)
 }
 
 static gint
-moz_gtk_toggle_paint(GdkDrawable* drawable, GdkRectangle* rect,
-                     GdkRectangle* cliprect, GtkWidgetState* state,
-                     gboolean selected, gboolean inconsistent,
-                     gboolean isradio, GtkTextDirection direction)
-{
-    GtkStateType state_type = ConvertGtkState(state);
-    GtkShadowType shadow_type = (selected)?GTK_SHADOW_IN:GTK_SHADOW_OUT;
-    gint indicator_size, indicator_spacing;
-    gint x, y, width, height;
-    gint focus_x, focus_y, focus_width, focus_height;
-    GtkWidget *w;
-    GtkStyle *style;
-
-    if (isradio) {
-        moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing);
-        w = gParts->radiobuttonWidget;
-    } else {
-        moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing);
-        w = gParts->checkboxWidget;
-    }
-
-    // "GetMinimumWidgetSize was ignored"
-    // FIXME: This assert causes a build failure in WebKitGTK+ debug
-    // builds, because it uses 'false' in its definition. We may want
-    // to force this file to be built with g++, by renaming it.
-    // ASSERT(rect->width == indicator_size);
-
-    /*
-     * vertically center in the box, since XUL sometimes ignores our
-     * GetMinimumWidgetSize in the vertical dimension
-     */
-    x = rect->x;
-    y = rect->y + (rect->height - indicator_size) / 2;
-    width = indicator_size;
-    height = indicator_size;
-
-    focus_x = x - indicator_spacing;
-    focus_y = y - indicator_spacing;
-    focus_width = width + 2 * indicator_spacing;
-    focus_height = height + 2 * indicator_spacing;
-  
-    style = gtk_widget_get_style(w);
-    TSOffsetStyleGCs(style, x, y);
-
-    gtk_widget_set_sensitive(w, !state->disabled);
-    gtk_widget_set_direction(w, direction);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), selected);
-      
-    if (isradio) {
-        gtk_paint_option(style, drawable, state_type, shadow_type, cliprect,
-                         gParts->radiobuttonWidget, "radiobutton", x, y,
-                         width, height);
-        if (state->focused) {
-            gtk_paint_focus(style, drawable, GTK_STATE_ACTIVE, cliprect,
-                            gParts->radiobuttonWidget, "radiobutton", focus_x, focus_y,
-                            focus_width, focus_height);
-        }
-    }
-    else {
-       /*
-        * 'indeterminate' type on checkboxes. In GTK, the shadow type
-        * must also be changed for the state to be drawn.
-        */
-        if (inconsistent) {
-            gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gParts->checkboxWidget), TRUE);
-            shadow_type = GTK_SHADOW_ETCHED_IN;
-        } else {
-            gtk_toggle_button_set_inconsistent(GTK_TOGGLE_BUTTON(gParts->checkboxWidget), FALSE);
-        }
-
-        gtk_paint_check(style, drawable, state_type, shadow_type, cliprect, 
-                        gParts->checkboxWidget, "checkbutton", x, y, width, height);
-        if (state->focused) {
-            gtk_paint_focus(style, drawable, GTK_STATE_ACTIVE, cliprect,
-                            gParts->checkboxWidget, "checkbutton", focus_x, focus_y,
-                            focus_width, focus_height);
-        }
-    }
-
-    return MOZ_GTK_SUCCESS;
-}
-
-static gint
 calculate_button_inner_rect(GtkWidget* button, GdkRectangle* rect,
                             GdkRectangle* inner_rect,
                             GtkTextDirection direction,
@@ -1220,8 +1091,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
         w = gParts->progresWidget;
         break;
     /* These widgets have no borders, since they are not containers. */
-    case MOZ_GTK_CHECKBUTTON:
-    case MOZ_GTK_RADIOBUTTON:
     case MOZ_GTK_SCROLLBAR_BUTTON:
     case MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL:
     case MOZ_GTK_SCROLLBAR_TRACK_VERTICAL:
@@ -1281,14 +1150,6 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
                                     (GtkReliefStyle) flags, gParts->buttonWidget,
                                     direction);
         break;
-    case MOZ_GTK_CHECKBUTTON:
-    case MOZ_GTK_RADIOBUTTON:
-        return moz_gtk_toggle_paint(drawable, rect, cliprect, state,
-                                    !!(flags & MOZ_GTK_WIDGET_CHECKED),
-                                    !!(flags & MOZ_GTK_WIDGET_INCONSISTENT),
-                                    (widget == MOZ_GTK_RADIOBUTTON),
-                                    direction);
-        break;
     case MOZ_GTK_SCROLLBAR_BUTTON:
         return moz_gtk_scrollbar_button_paint(drawable, rect, cliprect, state,
                                               (GtkScrollbarButtonFlags) flags,
diff --git a/Source/WebCore/platform/gtk/gtkdrawing.h b/Source/WebCore/platform/gtk/gtkdrawing.h
index 412a1f7..a261de5 100644
--- a/Source/WebCore/platform/gtk/gtkdrawing.h
+++ b/Source/WebCore/platform/gtk/gtkdrawing.h
@@ -87,8 +87,6 @@ typedef struct _GtkThemeParts {
     GtkWidget* buttonWidget;
     GtkWidget* toggleButtonWidget;
     GtkWidget* buttonArrowWidget;
-    GtkWidget* checkboxWidget;
-    GtkWidget* radiobuttonWidget;
     GtkWidget* horizScrollbarWidget;
     GtkWidget* vertScrollbarWidget;
     GtkWidget* entryWidget;
@@ -118,18 +116,10 @@ typedef gint (*style_prop_t)(GtkStyle*, const gchar*, gint);
 #define MOZ_GTK_UNKNOWN_WIDGET -1
 #define MOZ_GTK_UNSAFE_THEME -2
 
-/*** checkbox/radio flags ***/
-#define MOZ_GTK_WIDGET_CHECKED 1
-#define MOZ_GTK_WIDGET_INCONSISTENT (1 << 1)
-
 /*** widget type constants ***/
 typedef enum {
   /* Paints a GtkButton. flags is a GtkReliefStyle. */
   MOZ_GTK_BUTTON,
-  /* Paints a GtkCheckButton. flags is a boolean, 1=checked, 0=not checked. */
-  MOZ_GTK_CHECKBUTTON,
-  /* Paints a GtkRadioButton. flags is a boolean, 1=checked, 0=not checked. */
-  MOZ_GTK_RADIOBUTTON,
   /**
    * Paints the button of a GtkScrollbar. flags is a GtkArrowType giving
    * the arrow direction.
@@ -224,28 +214,6 @@ gint moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
                                gint* right, gint* bottom, GtkTextDirection direction,
                                gboolean inhtml);
 
-/**
- * Get the desired size of a GtkCheckButton
- * indicator_size:     [OUT] the indicator size
- * indicator_spacing:  [OUT] the spacing between the indicator and its
- *                     container
- *
- * returns:    MOZ_GTK_SUCCESS if there was no error, an error code otherwise
- */
-gint
-moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing);
-
-/**
- * Get the desired size of a GtkRadioButton
- * indicator_size:     [OUT] the indicator size
- * indicator_spacing:  [OUT] the spacing between the indicator and its
- *                     container
- *
- * returns:    MOZ_GTK_SUCCESS if there was no error, an error code otherwise
- */
-gint
-moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing);
-
 /** Get the focus metrics for a treeheadercell, button, checkbox, or radio button.
  * widget:             [IN]  the widget to get the focus metrics for    
  * interior_focus:     [OUT] whether the focus is drawn around the

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list