Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php	(revision 23618)
+++ wp-includes/comment-template.php	(working copy)
@@ -1244,11 +1244,11 @@
 			case 'div':
 				break;
 			case 'ol':
-				echo "<ol class='children'>\n";
+				echo '<ol class="children">' . "\n";
 				break;
 			default:
 			case 'ul':
-				echo "<ul class='children'>\n";
+				echo '<ul class="children">' . "\n";
 				break;
 		}
 	}
@@ -1268,11 +1268,11 @@
 			case 'div':
 				break;
 			case 'ol':
-				echo "</ol>\n";
+				echo "</ol><!-- .children -->\n";
 				break;
 			default:
 			case 'ul':
-				echo "</ul>\n";
+				echo "</ul><!-- .children -->\n";
 				break;
 		}
 	}
@@ -1330,13 +1330,67 @@
 		$GLOBALS['comment_depth'] = $depth;
 		$GLOBALS['comment'] = $comment;
 
-		if ( !empty($args['callback']) ) {
-			call_user_func($args['callback'], $comment, $args, $depth);
+		if ( !empty( $args['callback'] ) ) {
+			call_user_func( $args['callback'], $comment, $args, $depth );
 			return;
 		}
 
-		extract($args, EXTR_SKIP);
+		if ( ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) && $args['short_ping'] ) {
+			$this->ping( $comment, $depth, $args );
+		} elseif ( 'html5' === $args['markup'] ) {
+			$this->html5_comment( $comment, $depth, $args );
+		} else {
+			$this->comment( $comment, $depth, $args );
+		}
+	}
+
+	/**
+	 * @see Walker::end_el()
+	 * @since 2.7.0
+	 *
+	 * @param string $output Passed by reference. Used to append additional content.
+	 * @param object $comment
+	 * @param int $depth Depth of comment.
+	 * @param array $args
+	 */
+	function end_el( &$output, $comment, $depth = 0, $args = array() ) {
+		if ( !empty( $args['end-callback'] ) ) {
+			call_user_func( $args['end-callback'], $comment, $args, $depth );
+			return;
+		}
+		if ( 'div' == $args['style'] )
+			echo "</div><!-- #comment-## -->\n";
+		else
+			echo "</li><!-- #comment-## -->\n";
+	}
 
+	/**
+	 * @since 3.6
+	 * @access protected
+	 *
+	 * @param object $comment
+	 * @param int $depth Depth of comment.
+	 * @param array $args
+	 */
+	protected function ping( $comment, $depth, $args ) {
+		$tag = ( 'div' == $args['style'] ) ? 'div' : 'li';
+?>
+		<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
+			<div class="comment-body">
+				<?php _e( 'Pingback:' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
+			</div>
+<?php
+	}
+
+	/**
+	 * @since 3.6
+	 * @access protected
+	 *
+	 * @param object $comment Comment to display.
+	 * @param int $depth Depth of comment.
+	 * @param array $args Optional args.
+	 */
+	protected function comment( $comment, $depth, $args ) {
 		if ( 'div' == $args['style'] ) {
 			$tag = 'div';
 			$add_below = 'comment';
@@ -1345,30 +1399,30 @@
 			$add_below = 'div-comment';
 		}
 ?>
-		<<?php echo $tag ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?> id="comment-<?php comment_ID() ?>">
+		<<?php echo $tag; ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?> id="comment-<?php comment_ID(); ?>">
 		<?php if ( 'div' != $args['style'] ) : ?>
-		<div id="div-comment-<?php comment_ID() ?>" class="comment-body">
+		<div id="div-comment-<?php comment_ID(); ?>" class="comment-body">
 		<?php endif; ?>
 		<div class="comment-author vcard">
-		<?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?>
-		<?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?>
+			<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
+			<?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>' ), get_comment_author_link() ); ?>
 		</div>
-<?php if ($comment->comment_approved == '0') : ?>
-		<em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.') ?></em>
+		<?php if ( '0' == $comment->comment_approved ) : ?>
+		<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.' ) ?></em>
 		<br />
-<?php endif; ?>
+		<?php endif; ?>
 
-		<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
+		<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
 			<?php
 				/* translators: 1: date, 2: time */
-				printf( __('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'&nbsp;&nbsp;','' );
+				printf( __( '%1$s at %2$s' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' );
 			?>
 		</div>
 
 		<?php comment_text() ?>
 
 		<div class="reply">
-		<?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
+			<?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
 		</div>
 		<?php if ( 'div' != $args['style'] ) : ?>
 		</div>
@@ -1377,25 +1431,48 @@
 	}
 
 	/**
-	 * @see Walker::end_el()
-	 * @since 2.7.0
+	 * @since 3.6
+	 * @access protected
 	 *
-	 * @param string $output Passed by reference. Used to append additional content.
-	 * @param object $comment
+	 * @param object $comment Comment to display.
 	 * @param int $depth Depth of comment.
-	 * @param array $args
+	 * @param array $args Optional args.
 	 */
-	function end_el(&$output, $comment, $depth = 0, $args = array() ) {
-		if ( !empty($args['end-callback']) ) {
-			call_user_func($args['end-callback'], $comment, $args, $depth);
-			return;
-		}
-		if ( 'div' == $args['style'] )
-			echo "</div>\n";
-		else
-			echo "</li>\n";
-	}
+	protected function html5_comment( $comment, $depth, $args ) {
+		$tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
+?>
+		<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
+			<article class="comment-body">
+				<footer class="comment-meta">
+					<div class="comment-author vcard">
+						<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
+						<?php printf( __( '%s <span class="says">says:</span>' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
+					</div><!-- .comment-author -->
+
+					<div class="comment-metadata">
+						<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
+							<time datetime="<?php comment_time( 'c' ); ?>">
+								<?php printf( _x( '%1$s at %2$s', '1: date, 2: time' ), get_comment_date(), get_comment_time() ); ?>
+							</time>
+						</a>
+						<?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
+					</div><!-- .comment-metadata -->
+
+					<?php if ( '0' == $comment->comment_approved ) : ?>
+					<p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.' ); ?></p>
+					<?php endif; ?>
+				</footer><!-- .comment-meta -->
 
+				<div class="comment-content">
+					<?php comment_text(); ?>
+				</div><!-- .comment-content -->
+
+				<div class="reply">
+					<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
+				</div><!-- .reply -->
+			</article><!-- .comment-body -->
+<?php
+	}
 }
 
 /**
@@ -1417,8 +1494,21 @@
 	$comment_alt = $comment_thread_alt = 0;
 	$comment_depth = 1;
 
-	$defaults = array('walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all',
-		'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => '');
+	$defaults = array(
+		'walker'            => null,
+		'max_depth'         => '',
+		'style'             => 'ul',
+		'callback'          => null,
+		'end-callback'      => null,
+		'type'              => 'all',
+		'page'              => '',
+		'per_page'          => '',
+		'avatar_size'       => 32,
+		'reverse_top_level' => null,
+		'reverse_children'  => '',
+		'markup'            => '', // 'html5' or empty string
+		'short_ping'        => false,
+	);
 
 	$r = wp_parse_args( $args, $defaults );
 
