Index: modules/field/field.attach.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.attach.inc,v
retrieving revision 1.37
diff -u -r1.37 field.attach.inc
--- modules/field/field.attach.inc	19 Aug 2009 13:31:12 -0000	1.37
+++ modules/field/field.attach.inc	20 Aug 2009 01:11:06 -0000
@@ -1008,8 +1008,6 @@
  *       '#object_type' => the type of the object being displayed,
  *       '#build_mode' => the build mode,
  *       '#field_name' => the name of the field,
- *       '#single' => boolean indicating whether the formatter is single or
- *         multiple,
  *       'items' => array(
  *         // One sub-array per field value, keyed by delta.
  *         0 => array(
@@ -1017,8 +1015,11 @@
  *
  *           // Only for 'single-value' formatters:
  *           '#theme' => the formatter's theme function,
+ *           '#theme_wrappers => array('field-item'),
  *           '#formatter' => name of the formatter,
  *           '#settings' => array of formatter settings,
+ *           '#single' => boolean indicating whether the formatter is single or
+ *             multiple,
  *           '#object' => the fieldable object being displayed,
  *           '#object_type' => the type of the object being displayed,
  *           '#field_name' => the name of the field,
@@ -1031,8 +1032,11 @@
  *
  *         // Only for 'multiple-values' formatters:
  *         '#theme' => the formatter's theme function,
+ *         '#theme_wrappers => array('field-item'),
  *         '#formatter' => name of the formatter,
  *         '#settings' => array of formatter settings,
+ *         '#single' => boolean indicating whether the formatter is single or
+ *           multiple,
  *         '#object' => the fieldable object being displayed,
  *         '#object_type' => the type of the object being displayed,
  *         '#field_name' => the name of the field,
@@ -1057,7 +1061,6 @@
   drupal_alter('field_attach_view', $output, $obj_type, $object, $build_mode);
 
   return $output;
-
 }
 
 /**
Index: modules/field/field.default.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.default.inc,v
retrieving revision 1.15
diff -u -r1.15 field.default.inc
--- modules/field/field.default.inc	19 Aug 2009 13:31:12 -0000	1.15
+++ modules/field/field.default.inc	20 Aug 2009 01:11:06 -0000
@@ -47,6 +47,7 @@
     $items = field_get_default_value($obj_type, $object, $field, $instance);
   }
 }
+
 /**
  * Default field 'view' operation.
  *
@@ -81,7 +82,6 @@
       '#access' => field_access('view', $field),
       '#label_display' => $label_display,
       '#build_mode' => $build_mode,
-      '#single' => $single,
       'items' => array(),
     );
 
@@ -96,9 +96,11 @@
     // Append formatter information either on each item ('single-value' formatter)
     // or at the upper 'items' level ('multiple-value' formatter)
     $format_info = $info + array(
+      '#theme' => $theme,
+      '#theme_wrappers' => array('field_item'),
       '#formatter' => $display['type'],
       '#settings' => $display['settings'],
-      '#theme' => $theme,
+      '#single' => $single,
     );
 
     if ($single) {
Index: modules/field/field.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.module,v
retrieving revision 1.24
diff -u -r1.24 field.module
--- modules/field/field.module	19 Aug 2009 22:46:05 -0000	1.24
+++ modules/field/field.module	20 Aug 2009 01:11:06 -0000
@@ -173,6 +173,9 @@
       'arguments' => array('element' => NULL),
       'path' => $path,
     ),
+    'field_item' => array(
+      'arguments' => array('element' => NULL),
+    ),
     'field_multiple_value_form' => array(
       'arguments' => array('element' => NULL),
     ),
@@ -636,14 +639,23 @@
 }
 
 /**
+ * Theme preprocess function for field-item.tpl.php.
+ * TODO : itemS ?
+ */
+function theme_field_item($element) {
+  if (!empty($element['#children'])) {
+    $delta = $element['#single'] ? $element['#item']['#delta'] : 0;
+    $zebra = $delta % 2 ? 'odd' : 'even';
+    return '<div class="field-item '. $zebra .'">' . $element['#children'] . '</div>';
+  }
+}
+
+/**
  * Theme preprocess function for field.tpl.php.
  *
  * The $variables array contains the following arguments:
  * - $object
  * - $field
- * - $items
- * - $teaser
- * - $page
  *
  * @see field.tpl.php
  */
@@ -653,52 +665,29 @@
   $instance = field_info_instance($element['#field_name'], $bundle);
   $field = field_info_field($element['#field_name']);
 
-  $variables['object'] = $element['#object'];
-  $variables['field'] = $field;
-  $variables['instance'] = $instance;
-  $variables['items'] = array();
-
-  if ($element['#single']) {
-    // Single value formatter.
-    foreach (element_children($element['items']) as $delta) {
-      $variables['items'][$delta] = $element['items'][$delta]['#item'];
-      $variables['items'][$delta]['view'] = drupal_render_children($element['items'], array($delta));
-    }
-  }
-  else {
-    // Multiple values formatter.
-    // We display the 'all items' output as $items[0], as if it was the
-    // output of a single valued field.
-    // Raw values are still exposed for all items.
-    foreach (element_children($element['items']) as $delta) {
-      $variables['items'][$delta] = $element['items'][$delta]['#item'];
-    }
-    $variables['items'][0]['view'] = drupal_render_children($element, array('items'));
-  }
-
-  $variables['build_mode'] = $element['#build_mode'];
-  $variables['page'] = (bool)menu_get_object();
-
-  $field_empty = TRUE;
-
-  foreach ($variables['items'] as $delta => $item) {
-    if (!isset($item['view']) || (empty($item['view']) && (string)$item['view'] !== '0')) {
-      $variables['items'][$delta]['empty'] = TRUE;
-    }
-    else {
-      $field_empty = FALSE;
-      $variables['items'][$delta]['empty'] = FALSE;
-    }
-  }
+  $field_type_css = strtr($field['type'], '_', '-');
+  $field_name_css = strtr($field['field_name'], '_', '-');
 
   $additions = array(
+    'object' => $element['#object'],
+    'field' => $field,
+    'instance' => $instance,
+    'build_mode' => $element['#build_mode'],
+    'content' => $element['items'],
     'field_type' => $field['type'],
     'field_name' => $field['field_name'],
-    'field_type_css' => strtr($field['type'], '_', '-'),
-    'field_name_css' => strtr($field['field_name'], '_', '-'),
+    'field_type_css' => $field_type_css,
+    'field_name_css' => $field_name_css,
     'label' => check_plain(t($instance['label'])),
     'label_display' => $element['#label_display'],
-    'field_empty' => $field_empty,
+    // TODO document
+    'label_hidden' => $element['#label_display'] == 'hidden',
+    // TODO document
+    'classes_array' => array(
+      'field-type-' . $field_type_css,
+      'field-name-' . $field_name_css,
+      'field-label-' . $element['#label_display'],
+    ),
     'template_files' => array(
       'field',
       'field-' . $element['#field_name'],
Index: modules/field/theme/field.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/theme/field.tpl.php,v
retrieving revision 1.3
diff -u -r1.3 field.tpl.php
--- modules/field/theme/field.tpl.php	22 Jun 2009 09:10:04 -0000	1.3
+++ modules/field/theme/field.tpl.php	20 Aug 2009 01:11:06 -0000
@@ -2,48 +2,31 @@
 // $Id: field.tpl.php,v 1.3 2009/06/22 09:10:04 dries Exp $
 
 /**
- * @file field-field.tpl.php
+ * @file field.tpl.php
  * Default theme implementation to display the value of a field.
  *
  * Available variables:
  * - $object: The object to which the field is attached.
  * - $field: The field array.
- * - $items: An array of values for each item in the field array.
  * - $build_mode: Build mode, e.g. 'full', 'teaser'...
- * - $page: Whether this is displayed as a page.
  * - $field_name: The field name.
  * - $field_type: The field type.
  * - $field_name_css: The css-compatible field name.
  * - $field_type_css: The css-compatible field type.
  * - $label: The item label.
- * - $label_display: Position of label display, inline, above, or hidden.
- * - $field_empty: Whether the field has any valid value.
- *
- * Each $item in $items contains:
- * - 'view' - the themed view for that item
+ * - $label_display: Position of label display, 'inline', 'above', or 'hidden'.
+ * - $content - An array of field items. Use print render() output them.
  *
  * @see template_preprocess_field()
  */
 ?>
-<?php if (!$field_empty) : ?>
-<div class="field field-type-<?php print $field_type_css ?> field-<?php print $field_name_css ?>">
-  <?php if ($label_display == 'above') : ?>
-    <div class="field-label"><?php print t($label) ?>:&nbsp;</div>
-  <?php endif;?>
+<?php if (!empty($content)) : ?>
+<div class="field <?php print $classes; ?> clearfix">
+  <?php if (!$label_hidden) : ?>
+    <div class="field-label"><?php print $label ?>:&nbsp;</div>
+  <?php endif; ?>
   <div class="field-items">
-    <?php $count = 1;
-    foreach ($items as $delta => $item) :
-      if (!$item['empty']) : ?>
-        <div class="field-item <?php print ($count % 2 ? 'odd' : 'even') ?>">
-          <?php if ($label_display == 'inline') { ?>
-            <div class="field-label-inline<?php print($delta ? '' : '-first')?>">
-              <?php print t($label) ?>:&nbsp;</div>
-          <?php } ?>
-          <?php print $item['view'] ?>
-        </div>
-      <?php $count++;
-      endif;
-    endforeach;?>
+    <?php print render($content) ?>
   </div>
 </div>
 <?php endif; ?>
Index: modules/field/theme/field.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/theme/field.css,v
retrieving revision 1.5
diff -u -r1.5 field.css
--- modules/field/theme/field.css	12 Jun 2009 08:39:37 -0000	1.5
+++ modules/field/theme/field.css	20 Aug 2009 01:11:06 -0000
@@ -1,17 +1,13 @@
 /* $Id: field.css,v 1.5 2009/06/12 08:39:37 dries Exp $ */
 
 /* Field display */
-.field .field-label,
-.field .field-label-inline,
-.field .field-label-inline-first {
+.field .field-label {
   font-weight: bold;
 }
-.field .field-label-inline,
-.field .field-label-inline-first {
-  display: inline;
-}
-.field .field-label-inline {
-  visibility: hidden;
+
+.field-label-inline .field-label,
+.field-label-inline .field-items {
+  float:left;
 }
 
 form .field-multiple-table {
Index: modules/field/theme/field-item.tpl.php
===================================================================
RCS file: modules/field/theme/field-item.tpl.php
diff -N modules/field/theme/field-item.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/field/theme/field-item.tpl.php	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,20 @@
+<?php
+// $Id$
+
+/**
+ * @file field-item.tpl.php
+ * Default theme implementation to display the value of a field item.
+ *
+ * Available variables:
+ * - $delta: The item delta.
+ * - $content - An HTML string representing the themed item.
+ *
+ * @see template_preprocess_field_item()
+ */
+?>
+
+<?php if (!empty($content)) : ?>
+  <div class="field-item <?php print $zebra ?>">
+    <?php print $content ?>
+  </div>
+<?php endif; ?>
