Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.432
diff -u -p -r1.432 form.inc
--- includes/form.inc	12 Feb 2010 15:11:29 -0000	1.432
+++ includes/form.inc	2 Mar 2010 19:33:42 -0000
@@ -1950,8 +1950,10 @@ function theme_fieldset($variables) {
 
   $output = '<fieldset' . drupal_attributes($element['#attributes']) . '>';
   if (!empty($element['#title'])) {
-    $output .= '<legend>' . $element['#title'] . '</legend>';
+    // Always wrap fieldset legends in a SPAN for CSS positioning.
+    $output .= '<legend><span class="fieldset-legend">' . $element['#title'] . '</span></legend>';
   }
+  $output .= '<div class="fieldset-wrapper">';
   if (!empty($element['#description'])) {
     $output .= '<div class="fieldset-description">' . $element['#description'] . '</div>';
   }
@@ -1959,6 +1961,7 @@ function theme_fieldset($variables) {
   if (isset($element['#value'])) {
     $output .= $element['#value'];
   }
+  $output .= '</div>';
   $output .= "</fieldset>\n";
   return $output;
 }
Index: misc/collapse.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/collapse.js,v
retrieving revision 1.27
diff -u -p -r1.27 collapse.js
--- misc/collapse.js	8 Nov 2009 11:46:22 -0000	1.27
+++ misc/collapse.js	2 Mar 2010 21:32:26 -0000
@@ -5,40 +5,33 @@
  * Toggle the visibility of a fieldset using smooth animations.
  */
 Drupal.toggleFieldset = function (fieldset) {
-  if ($(fieldset).is('.collapsed')) {
-    // Action div containers are processed separately because of a IE bug
-    // that alters the default submit button behavior.
-    var content = $('> div:not(.action)', fieldset);
-    $(fieldset)
+  var $fieldset = $(fieldset);
+  if ($fieldset.is('.collapsed')) {
+    var $content = $('> .fieldset-wrapper', fieldset).hide();
+    $fieldset
       .removeClass('collapsed')
       .trigger({ type: 'collapsed', value: false })
-      .find('> legend > a > span.element-invisible')
-        .empty()
-        .append(Drupal.t('Hide'));
-    content.hide();
-    content.slideDown({
+      .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Hide'));
+    $content.slideDown({
       duration: 'fast',
       easing: 'linear',
       complete: function () {
-        Drupal.collapseScrollIntoView(this.parentNode);
-        this.parentNode.animating = false;
-        $('div.action', fieldset).show();
+        Drupal.collapseScrollIntoView(fieldset);
+        fieldset.animating = false;
       },
       step: function () {
         // Scroll the fieldset into view.
-        Drupal.collapseScrollIntoView(this.parentNode);
+        Drupal.collapseScrollIntoView(fieldset);
       }
     });
   }
   else {
-    $('div.action', fieldset).hide();
-    $(fieldset).trigger({ type: 'collapsed', value: true });
-    var content = $('> div:not(.action)', fieldset).slideUp('fast', function () {
-      $(this.parentNode).addClass('collapsed')
-        .find('> legend > a > span.element-invisible')
-          .empty()
-          .append(Drupal.t('Show'));
-      this.parentNode.animating = false;
+    $fieldset.trigger({ type: 'collapsed', value: true });
+    $('> .fieldset-wrapper', fieldset).slideUp('fast', function () {
+      $fieldset
+        .addClass('collapsed')
+        .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Show'));
+      fieldset.animating = false;
     });
   }
 };
@@ -63,45 +56,45 @@ Drupal.collapseScrollIntoView = function
 
 Drupal.behaviors.collapse = {
   attach: function (context, settings) {
-    $('fieldset.collapsible > legend', context).once('collapse', function () {
-      var fieldset = $(this.parentNode);
+    $('fieldset.collapsible', context).once('collapse', function () {
+      var $fieldset = $(this);
       // Expand if there are errors inside.
-      if ($('input.error, textarea.error, select.error', fieldset).size() > 0) {
-        fieldset.removeClass('collapsed');
+      if ($('.error', $fieldset).length) {
+        $fieldset.removeClass('collapsed');
       }
 
       var summary = $('<span class="summary"></span>');
-      fieldset.
+      $fieldset.
         bind('summaryUpdated', function () {
-          var text = $.trim(fieldset.getSummary());
+          var text = $.trim($fieldset.getSummary());
           summary.html(text ? ' (' + text + ')' : '');
         })
         .trigger('summaryUpdated');
 
-      // Turn the legend into a clickable link and wrap the contents of the
-      // fieldset in a div for easier animation.
-      var text = this.innerHTML;
-      $(this).empty()
-        .append($('<a href="#">' + text + '</a>')
-          .click(function () {
-            var fieldset = $(this).parents('fieldset:first')[0];
-            // Don't animate multiple times.
-            if (!fieldset.animating) {
-              fieldset.animating = true;
-              Drupal.toggleFieldset(fieldset);
-            }
-            return false;
-          })
-          .prepend($('<span class="element-invisible"></span>')
-            .append(fieldset.hasClass('collapsed') ? Drupal.t('Show') : Drupal.t('Hide'))
-            .after(' ')
-          )
-        )
-        .append(summary)
-        .after(
-          $('<div class="fieldset-wrapper"></div>')
-            .append(fieldset.children(':not(legend):not(.action)'))
-        );
+      // Turn the legend into a clickable link, but retain span.fieldset-legend
+      // for CSS positioning.
+      var $legend = $('> legend .fieldset-legend', this);
+
+      $('<span class="fieldset-legend-prefix element-invisible"></span>')
+        .append($fieldset.hasClass('collapsed') ? Drupal.t('Show') : Drupal.t('Hide'))
+        .prependTo($legend)
+        .after(' ');
+
+      // .wrapInner() does not retain bound events.
+      var $link = $('<a class="fieldset-title" href="#"></a>')
+        .prepend($legend.contents())
+        .appendTo($legend)
+        .click(function () {
+          var fieldset = $fieldset.get(0);
+          // Don't animate multiple times.
+          if (!fieldset.animating) {
+            fieldset.animating = true;
+            Drupal.toggleFieldset(fieldset);
+          }
+          return false;
+        });
+
+      $legend.append(summary);
     });
   }
 };
Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.43
diff -u -p -r1.43 comment.admin.inc
--- modules/comment/comment.admin.inc	22 Feb 2010 15:38:52 -0000	1.43
+++ modules/comment/comment.admin.inc	2 Mar 2010 19:33:42 -0000
@@ -39,8 +39,7 @@ function comment_admin_overview($form, &
   $form['options'] = array(
     '#type' => 'fieldset',
     '#title' => t('Update options'),
-    '#prefix' => '<div class="container-inline">',
-    '#suffix' => '</div>',
+    '#attributes' => array('class' => array('container-inline')),
   );
   $options = array();
   foreach (comment_operations($arg == 'approval' ? 'publish' : 'unpublish') as $key => $value) {
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.90
diff -u -p -r1.90 node.admin.inc
--- modules/node/node.admin.inc	15 Feb 2010 16:36:48 -0000	1.90
+++ modules/node/node.admin.inc	2 Mar 2010 19:33:42 -0000
@@ -388,8 +388,7 @@ function node_admin_nodes() {
   $form['options'] = array(
     '#type' => 'fieldset',
     '#title' => t('Update options'),
-    '#prefix' => '<div class="container-inline">',
-    '#suffix' => '</div>',
+    '#attributes' => array('class' => array('container-inline')),
     '#access' => $admin_access,
   );
   $options = array();
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1239
diff -u -p -r1.1239 node.module
--- modules/node/node.module	27 Feb 2010 20:37:11 -0000	1.1239
+++ modules/node/node.module	2 Mar 2010 19:33:42 -0000
@@ -2611,7 +2611,7 @@ function node_search_validate($form, &$f
     $keys .= ' "' . str_replace('"', ' ', $form_state['values']['phrase']) . '"';
   }
   if (!empty($keys)) {
-    form_set_value($form['basic']['inline']['processed_keys'], trim($keys), $form_state);
+    form_set_value($form['basic']['processed_keys'], trim($keys), $form_state);
   }
 }
 
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.41
diff -u -p -r1.41 path.admin.inc
--- modules/path/path.admin.inc	21 Jan 2010 04:20:08 -0000	1.41
+++ modules/path/path.admin.inc	2 Mar 2010 19:33:43 -0000
@@ -231,23 +231,23 @@ function path_admin_delete_confirm_submi
 function path_admin_filter_form($form, &$form_state, $keys = '') {
   $form['#attributes'] = array('class' => array('search-form'));
   $form['basic'] = array('#type' => 'fieldset',
-    '#title' => t('Filter aliases')
+    '#title' => t('Filter aliases'),
+    '#attributes' => array('class' => array('container-inline')),
   );
-  $form['basic']['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
-  $form['basic']['inline']['filter'] = array(
+  $form['basic']['filter'] = array(
     '#type' => 'textfield',
     '#title' => '',
     '#default_value' => $keys,
     '#maxlength' => 128,
     '#size' => 25,
   );
-  $form['basic']['inline']['submit'] = array(
+  $form['basic']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Filter'),
     '#submit' => array('path_admin_filter_form_submit_filter'),
     );
   if ($keys) {
-    $form['basic']['inline']['reset'] = array(
+    $form['basic']['reset'] = array(
       '#type' => 'submit',
       '#value' => t('Reset'),
       '#submit' => array('path_admin_filter_form_submit_reset'),
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.338
diff -u -p -r1.338 search.module
--- modules/search/search.module	17 Feb 2010 22:44:52 -0000	1.338
+++ modules/search/search.module	2 Mar 2010 19:33:43 -0000
@@ -901,19 +901,18 @@ function search_form($form, &$form_state
   $form['#action'] = $action;
   $form['#attributes']['class'][] = 'search-form';
   $form['module'] = array('#type' => 'value', '#value' => $type);
-  $form['basic'] = array('#type' => 'item', '#title' => $prompt, '#id' => 'edit-keys');
-  $form['basic']['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
-  $form['basic']['inline']['keys'] = array(
+  $form['basic'] = array('#type' => 'container', '#attributes' => array('class' => array('container-inline')));
+  $form['basic']['keys'] = array(
     '#type' => 'textfield',
-    '#title' => '',
+    '#title' => $prompt,
     '#default_value' => $keys,
     '#size' => $prompt ? 40 : 20,
     '#maxlength' => 255,
   );
   // processed_keys is used to coordinate keyword passing between other forms
   // that hook into the basic search form.
-  $form['basic']['inline']['processed_keys'] = array('#type' => 'value', '#value' => array());
-  $form['basic']['inline']['submit'] = array('#type' => 'submit', '#value' => t('Search'));
+  $form['basic']['processed_keys'] = array('#type' => 'value', '#value' => array());
+  $form['basic']['submit'] = array('#type' => 'submit', '#value' => t('Search'));
 
   return $form;
 }
Index: modules/search/search.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.pages.inc,v
retrieving revision 1.15
diff -u -p -r1.15 search.pages.inc
--- modules/search/search.pages.inc	13 Jan 2010 05:40:03 -0000	1.15
+++ modules/search/search.pages.inc	2 Mar 2010 19:33:43 -0000
@@ -122,7 +122,7 @@ function template_preprocess_search_resu
  * value for the basic search form.
  */
 function search_form_validate($form, &$form_state) {
-  form_set_value($form['basic']['inline']['processed_keys'], trim($form_state['values']['keys']), $form_state);
+  form_set_value($form['basic']['processed_keys'], trim($form_state['values']['keys']), $form_state);
 }
 
 /**
Index: modules/simpletest/simpletest.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.test,v
retrieving revision 1.37
diff -u -p -r1.37 simpletest.test
--- modules/simpletest/simpletest.test	24 Dec 2009 08:03:53 -0000	1.37
+++ modules/simpletest/simpletest.test	2 Mar 2010 19:33:43 -0000
@@ -208,11 +208,11 @@ class SimpleTestFunctionalTest extends D
     if ($this->parse()) {
       if ($fieldset = $this->getResultFieldSet()) {
         // Code assumes this is the only test in group.
-        $results['summary'] = $this->asText($fieldset->div[1]);
+        $results['summary'] = $this->asText($fieldset->div->div[1]);
         $results['name'] = $this->asText($fieldset->legend);
 
         $results['assertions'] = array();
-        $tbody = $fieldset->table->tbody;
+        $tbody = $fieldset->div->table->tbody;
         foreach ($tbody->tr as $row) {
           $assertion = array();
           $assertion['message'] = $this->asText($row->td[0]);
@@ -231,8 +231,6 @@ class SimpleTestFunctionalTest extends D
 
   /**
    * Get the fieldset containing the results for group this test is in.
-   *
-   * @return fieldset containing the results for group this test is in.
    */
   function getResultFieldSet() {
     $fieldsets = $this->xpath('//fieldset');
Index: modules/system/system-behavior-rtl.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system-behavior-rtl.css,v
retrieving revision 1.1
diff -u -p -r1.1 system-behavior-rtl.css
--- modules/system/system-behavior-rtl.css	7 Jan 2010 07:41:46 -0000	1.1
+++ modules/system/system-behavior-rtl.css	2 Mar 2010 20:35:19 -0000
@@ -14,12 +14,12 @@ html.js input.throbbing {
 /**
  * Collapsing fieldsets
  */
-html.js fieldset.collapsible legend a {
+html.js fieldset.collapsible .fieldset-legend {
   padding-left: 0;
   padding-right: 15px;
   background-position: 98% 75%;
 }
-html.js fieldset.collapsed legend a {
+html.js fieldset.collapsed .fieldset-legend {
   background-image: url(../../misc/menu-collapsed-rtl.png);
   background-position: 98% 50%;
 }
Index: modules/system/system-behavior.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system-behavior.css,v
retrieving revision 1.4
diff -u -p -r1.4 system-behavior.css
--- modules/system/system-behavior.css	16 Feb 2010 01:05:52 -0000	1.4
+++ modules/system/system-behavior.css	2 Mar 2010 20:33:49 -0000
@@ -46,35 +46,28 @@ html.js fieldset.collapsed {
   margin-bottom: 0;
   height: 1em;
 }
-html.js fieldset.collapsed * {
+html.js fieldset.collapsed .fieldset-wrapper {
   display: none;
 }
-html.js fieldset.collapsed legend, html.js fieldset.collapsed legend a span.element-invisible {
+html.js fieldset.collapsible .fieldset-legend {
   display: block;
-  overflow: hidden;
-}
-html.js fieldset.collapsible legend a {
-  display: inline;
   padding-left: 15px; /* LTR */
   background: url(../../misc/menu-expanded.png) 5px 75% no-repeat; /* LTR */
 }
+html.js fieldset.collapsed .fieldset-legend {
+  background-image: url(../../misc/menu-collapsed.png); /* LTR */
+  background-position: 5px 50%; /* LTR */
+}
 html.js fieldset.collapsible legend span.summary {
-  display: inline;
   font-size: 0.9em;
   color: #999;
   margin-left: 0.5em;
 }
-html.js fieldset.collapsed legend a {
-  background-image: url(../../misc/menu-collapsed.png); /* LTR */
-  background-position: 5px 50%; /* LTR */
-}
-/* Note: IE-only fix due to '* html' (breaks Konqueror otherwise). */
-* html.js fieldset.collapsed legend,
-* html.js fieldset.collapsed legend *,
+/* IE6: Fix due to '* html' (breaks Konqueror otherwise). */
 * html.js fieldset.collapsed table * {
   display: inline;
 }
-/* For Safari 2 to prevent collapsible fieldsets containing tables from dissapearing due to tableheader.js. */
+/* Safari 2: Tables in collapsible fieldsets disappear due to tableheader.js. */
 html.js fieldset.collapsible {
   position: relative;
 }
@@ -267,9 +260,14 @@ div.password-confirm {
 /**
  * Inline items (need to override above)
  */
-.container-inline div, .container-inline label {
+.container-inline div,
+.container-inline label {
   display: inline;
 }
+/* Fieldset contents always need to be rendered as block. */
+.container-inline .fieldset-wrapper {
+  display: block;
+}
 
 .nowrap {
   white-space: nowrap;
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.259
diff -u -p -r1.259 system.admin.inc
--- modules/system/system.admin.inc	15 Feb 2010 15:07:57 -0000	1.259
+++ modules/system/system.admin.inc	2 Mar 2010 19:33:43 -0000
@@ -2900,8 +2900,7 @@ function system_actions_manage_form($for
   $form['parent'] = array(
     '#type' => 'fieldset',
     '#title' => t('Create an advanced action'),
-    '#prefix' => '<div class="container-inline">',
-    '#suffix' => '</div>',
+    '#attributes' => array('class' => array('container-inline')),
   );
   $form['parent']['action'] = array(
     '#type' => 'select',
Index: modules/trigger/trigger.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.admin.inc,v
retrieving revision 1.21
diff -u -p -r1.21 trigger.admin.inc
--- modules/trigger/trigger.admin.inc	6 Nov 2009 03:59:06 -0000	1.21
+++ modules/trigger/trigger.admin.inc	2 Mar 2010 19:33:43 -0000
@@ -160,8 +160,8 @@ function trigger_assign_form($form, $for
   }
 
   $form[$hook]['parent'] = array(
-    '#prefix' => "<div class='container-inline'>",
-    '#suffix' => '</div>',
+    '#type' => 'container',
+    '#attributes' => array('class' => array('container-inline')),
   );
   // List possible actions that may be assigned.
   if (count($options) != 0) {
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.99
diff -u -p -r1.99 user.admin.inc
--- modules/user/user.admin.inc	7 Feb 2010 17:29:09 -0000	1.99
+++ modules/user/user.admin.inc	2 Mar 2010 19:33:43 -0000
@@ -168,8 +168,7 @@ function user_admin_account() {
   $form['options'] = array(
     '#type' => 'fieldset',
     '#title' => t('Update options'),
-    '#prefix' => '<div class="container-inline">',
-    '#suffix' => '</div>',
+    '#attributes' => array('class' => array('container-inline')),
   );
   $options = array();
   foreach (module_invoke_all('user_operations') as $operation => $array) {
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.84
diff -u -p -r1.84 user.test
--- modules/user/user.test	25 Feb 2010 10:00:38 -0000	1.84
+++ modules/user/user.test	2 Mar 2010 19:33:43 -0000
@@ -143,7 +143,7 @@ class UserRegistrationTestCase extends D
     variable_set('user_default_timezone', DRUPAL_USER_TIMEZONE_SELECT);
     $this->drupalLogout();
     $this->drupalGet('user/register');
-    $this->assertRaw('<fieldset id="edit-account"><legend>Account information</legend>', t('Account settings fieldset was not hidden.'));
+    $this->assertText(t('Account information'), t('Account settings fieldset was not hidden.'));
   }
 }
 
Index: themes/garland/style-rtl.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/style-rtl.css,v
retrieving revision 1.17
diff -u -p -r1.17 style-rtl.css
--- themes/garland/style-rtl.css	22 Nov 2009 03:25:42 -0000	1.17
+++ themes/garland/style-rtl.css	2 Mar 2010 20:35:12 -0000
@@ -227,13 +227,13 @@ ul.links li, ul.inline li {
   margin-right: 25px;
 }
 
-html.js fieldset.collapsible legend a {
+html.js fieldset.collapsible .fieldset-legend {
   padding-left: 0;
   padding-right: 2em;
   background: url("images/menu-expanded.gif") no-repeat 100% 50%;
 }
 
-html.js fieldset.collapsed legend a {
+html.js fieldset.collapsed .fieldset-legend {
   background: url("images/menu-collapsed-rtl.gif") no-repeat 100% 50%;
 }
 
Index: themes/garland/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/style.css,v
retrieving revision 1.73
diff -u -p -r1.73 style.css
--- themes/garland/style.css	30 Jan 2010 07:59:26 -0000	1.73
+++ themes/garland/style.css	2 Mar 2010 21:05:37 -0000
@@ -892,38 +892,28 @@ fieldset {
   background-position: 0 0;
 }
 
-*:first-child+html fieldset > .description, *:first-child+html fieldset .fieldset-wrapper .description {
+*:first-child+html fieldset .fieldset-wrapper .fieldset-description {
   padding-top: 1em;
 }
 
-fieldset legend {
-  /* Fix disappearing legend in FFox */
-  display: block;
-}
-
-*:first-child+html fieldset legend, *:first-child+html fieldset.collapsed legend {
-  display: inline;
-}
-
 html.js fieldset.collapsed {
   background: transparent;
   padding-top: 0;
   padding-bottom: .6em;
 }
 
-html.js fieldset.collapsible legend a {
+html.js fieldset.collapsible .fieldset-legend {
   padding-left: 2em; /* LTR */
   background: url(images/menu-expanded.gif) no-repeat 0% 50%; /* LTR */
 }
+html.js fieldset.collapsed .fieldset-legend {
+  background: url(images/menu-collapsed.gif) no-repeat 0% 50%; /* LTR */
+}
 
 html.js fieldset.collapsible legend span.summary {
   color: #898989;
 }
 
-html.js fieldset.collapsed legend a {
-  background: url(images/menu-collapsed.gif) no-repeat 0% 50%; /* LTR */
-}
-
 /**
  * Vertical tabs.
  */
Index: themes/seven/ie.css
===================================================================
RCS file: themes/seven/ie.css
diff -N themes/seven/ie.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ themes/seven/ie.css	2 Mar 2010 21:22:27 -0000
@@ -0,0 +1,12 @@
+/* $Id$ */
+
+/* IE7 renders legends in nested fieldsets without a width. */
+fieldset legend {
+  height: 1%;
+}
+
+/* IE renders absolute positioned legend where fieldset content starts. */
+fieldset .fieldset-legend {
+  left: 0;
+  top: 0;
+}
Index: themes/seven/ie6.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/seven/ie6.css,v
retrieving revision 1.3
diff -u -p -r1.3 ie6.css
--- themes/seven/ie6.css	30 Jan 2010 07:59:26 -0000	1.3
+++ themes/seven/ie6.css	2 Mar 2010 19:33:43 -0000
@@ -4,6 +4,7 @@ ul.menu li,
 ul.menu li a,
 ul.links li,
 ul.links li a,
+.action-links,
 #page {
   height: 1%;
 }
Index: themes/seven/reset.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/seven/reset.css,v
retrieving revision 1.4
diff -u -p -r1.4 reset.css
--- themes/seven/reset.css	17 Nov 2009 02:50:41 -0000	1.4
+++ themes/seven/reset.css	2 Mar 2010 20:02:58 -0000
@@ -214,7 +214,6 @@ body {
  * to sneak the clearfix class into Drupal's markup.
  * From http://www.positioniseverything.net/easyclearing.html
  */
-div.form-item:after,
 ul.links:after,
 div.admin-panel .body:after,
 .clearfix:after {
@@ -232,7 +231,7 @@ ul.inline:after {
   clear: none;
 }
 
-div.form-item,
+.form-item,
 ul.links,
 div.admin-panel .body,
 .clearfix {
@@ -240,14 +239,14 @@ div.admin-panel .body,
 }
 
 /* Hides from IE-mac \*/
-* html div.form-item,
+* html .form-item,
 * html ul.links,
 * html div.admin-panel .body,
 * html .clearfix {
   height: 1%;
 }
 
-div.form-item,
+.form-item,
 ul.links,
 div.admin-panel .body,
 .clearfix {
Index: themes/seven/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/seven/style.css,v
retrieving revision 1.45
diff -u -p -r1.45 style.css
--- themes/seven/style.css	17 Feb 2010 03:37:12 -0000	1.45
+++ themes/seven/style.css	2 Mar 2010 20:52:25 -0000
@@ -603,88 +603,100 @@ table tr.selected td {
 }
 
 /**
- * Forms.
+ * Fieldsets.
+ *
+ * Fieldset legends are displayed like containers in Seven. However, several
+ * browsers do not support styling of LEGEND elements. To achieve the desired
+ * styling:
+ * - All fieldsets use 'position: relative'.
+ * - All legend labels are wrapped in a single span.fieldset-legend that uses
+ *   'position: absolute', which means that the LEGEND element itself is not
+ *   rendered by browsers.
+ * - Due to using 'position: absolute', collapsed fieldsets do not have a
+ *   height; the fieldset requires a 'padding-top' to make the absolute
+ *   positioned .fieldset-legend appear as though it would have a height.
+ * - Various browsers are positioning the legend differently if there is a
+ *   'padding-left'/'padding-right' applied on a fieldset and inherit the
+ *   positioning even to absolute positioned elements within; we therefore have
+ *   to apply all padding to the inner .fieldset-wrapper instead.
  */
 
-/* Fieldsets & Form items */
 fieldset {
   border: 1px solid #ccc;
-  padding: 30px 13px 13px 14px;
-  margin: 0 0 10px;
+  padding: 2.5em 0 0 0;
+  position: relative;
+  margin: 1em 0;
 }
 
-fieldset legend span,
-fieldset legend a {
+fieldset .fieldset-legend {
+  margin-top: 0.5em;
+  padding-left: 15px;
   position: absolute;
-  margin-top: 9px;
+  text-transform: uppercase;
 }
 
-fieldset legend a span {
-  position: relative;
-  margin-top: 0;
+fieldset .fieldset-wrapper {
+  padding: 0 13px 13px 15px;
 }
 
 fieldset.collapsed {
-  background: transparent;
+  background-color: transparent;
 }
 
-html.js fieldset.collapsed legend,
-html.js fieldset.collapsed legend * {
-  display: block;
-}
 html.js fieldset.collapsed {
   border-width: 1px;
+  height: auto;
   margin-bottom: 10px;
-  padding: 13px;
 }
 
 fieldset fieldset {
-  background: #fff;
+  background-color: #fff;
 }
 
 fieldset fieldset fieldset {
-  background: #f8f8f8;
+  background-color: #f8f8f8;
 }
 
 html.js fieldset.collapsible .fieldset-wrapper {
   overflow: visible;
 }
 
-div.form-item {
+/**
+ * Form elements.
+ */
+
+.form-item {
   padding: 9px 0;
   margin: 0 0 10px;
 }
 
-.filter-wrapper div.form-item,
-div.teaser-checkbox div.form-item,
-div.form-item div.form-item,
-fieldset div.form-item {
+.filter-wrapper .form-item,
+div.teaser-checkbox .form-item,
+.form-item .form-item {
   padding: 5px 0;
   margin: 0;
   border: 0;
 }
-
+.form-type-checkbox {
+  padding: 0;
+}
 .text-format-wrapper .form-item {
   padding-bottom: 0;
 }
 
-div.form-item label {
+.form-item label {
   margin: 0;
   padding: 0;
 }
 
-fieldset legend {
-  text-transform: uppercase;
-}
-
-div.form-item label.option {
+.form-item label.option {
   text-transform: none;
 }
 
-div.form-item label.option {
+.form-item label.option {
   font-size: 12px;
 }
-div.form-item label.option input {
+.form-item label.option input {
   vertical-align: middle;
 }
 
@@ -700,7 +712,7 @@ div.form-item label.option input {
   padding-left: 6px;
 }
 
-.filter-wrapper div.form-item,
+.filter-wrapper .form-item,
 .filter-wrapper .filter-guidelines,
 .filter-wrapper .filter-help {
   font-size: 12px;
@@ -709,7 +721,7 @@ div.form-item label.option input {
 
 ul.tips,
 div.description,
-div.form-item div.description {
+.form-item div.description {
   margin: 5px 0;
   line-height: 15px;
   font-size: 12px;
@@ -856,10 +868,6 @@ div.admin-panel h3 {
   padding-bottom: 9px;
 }
 
-.container-inline fieldset {
-  display: block;
-}
-
 /* admin/appearance */
 #system-themes-page h2 {
   font-weight: normal;
Index: themes/seven/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/seven/template.php,v
retrieving revision 1.13
diff -u -p -r1.13 template.php
--- themes/seven/template.php	25 Feb 2010 20:57:39 -0000	1.13
+++ themes/seven/template.php	2 Mar 2010 19:33:43 -0000
@@ -5,6 +5,8 @@
  * Override or insert variables into the html template.
  */
 function seven_preprocess_html(&$vars) {
+  // Add conditional CSS for IE8 and below.
+  drupal_add_css(path_to_theme() . '/ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));
   // Add conditional CSS for IE6.
   drupal_add_css(path_to_theme() . '/ie6.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
 }
@@ -76,29 +78,6 @@ function seven_tablesort_indicator($vari
 }
 
 /**
- * Override of theme_fieldset().
- *
- * Add span to legend tag, so we can style it to be inside the fieldset.
- */
-function seven_fieldset($variables) {
-  $element = $variables['element'];
-
-  $output = '<fieldset' . drupal_attributes($element['#attributes']) . '>';
-  if (!empty($element['#title'])) {
-    $output .= '<legend><span>' . $element['#title'] . '</span></legend>';
-  }
-  if (!empty($element['#description'])) {
-    $output .= '<div class="fieldset-description">' . $element['#description'] . '</div>';
-  }
-  $output .= $element['#children'];
-  if (isset($element['#value'])) {
-    $output .= $element['#value'];
-  }
-  $output .= "</fieldset>\n";
-  return $output;
-}
-
-/**
  * Implements hook_css_alter().
  */
 function seven_css_alter(&$css) {
