Index: src/wp-admin/includes/post.php
===================================================================
--- src/wp-admin/includes/post.php	(revision 35748)
+++ src/wp-admin/includes/post.php	(working copy)
@@ -1699,6 +1699,15 @@
 	// _wp_put_post_revision() expects unescaped.
 	$post_data = wp_unslash( $post_data );
 
+	/**
+	 * Fires before an autosave is created.
+	 *
+	 * @since 4.5.0
+	 *
+	 * @param array $new_autosave Post array - the autosave that is about to be saved.
+	 */
+	do_action( 'wp_before_creating_autosave', $post_data );
+
 	// Otherwise create the new autosave as a special post revision
 	return _wp_put_post_revision( $post_data, true );
 }
Index: src/wp-includes/js/autosave.js
===================================================================
--- src/wp-includes/js/autosave.js	(revision 35748)
+++ src/wp-includes/js/autosave.js	(working copy)
@@ -37,6 +37,17 @@
 				excerpt: $( '#excerpt' ).val() || ''
 			};
 
+			/**
+			 * Attach revisioned meta field values to the autosave data.
+			 *
+			 * Iterates thru the revisioned meta fields, searhing the DOM for elements
+			 * with matching IDs, then storing the value as data[ID]. Enables inclusion
+			 * of the revisioned post meta data as part of the autosave.
+			 */
+			$( autosaveL10n.revisionedMetas ).each( function( index, meta ) {
+				data[meta] = $( document.getElementById( meta ) ).val() || '';
+			} );
+
 			if ( type === 'local' ) {
 				return data;
 			}
Index: src/wp-includes/revision.php
===================================================================
--- src/wp-includes/revision.php	(revision 35748)
+++ src/wp-includes/revision.php	(working copy)
@@ -509,6 +509,11 @@
 
 	add_filter( 'get_the_terms', '_wp_preview_terms_filter', 10, 3 );
 
+	/**
+	 * When doing a preview, use the autosaved revisioned post meta.
+	 */
+	add_filter( 'get_post_metadata', array( WP_Post_Meta_Revisioning, '_wp_preview_meta_filter' ), 10, 4 );
+
 	return $post;
 }
 
Index: src/wp-includes/script-loader.php
===================================================================
--- src/wp-includes/script-loader.php	(revision 35748)
+++ src/wp-includes/script-loader.php	(working copy)
@@ -807,9 +807,16 @@
  */
 function wp_just_in_time_script_localization() {
 
+	/**
+	 * Pass some data to the autosave JavaScript:
+	 * 	int   autosaveL10n.autosaveInterval How frequently to autosave.
+	 * 	int   autosaveL10n.blog_id          The current blog ID.
+	 * 	array autosaveL10n.revisionedMetas  The revisioned meta keys.
+	 */
 	wp_localize_script( 'autosave', 'autosaveL10n', array(
 		'autosaveInterval' => AUTOSAVE_INTERVAL,
-		'blog_id' => get_current_blog_id(),
+		'blog_id'          => get_current_blog_id(),
+		'revisionedMetas'  => WP_Post_Meta_Revisioning::_wp_post_revision_meta_keys(),
 	) );
 
 }
Index: tests/phpunit/tests/post/revisions.php
===================================================================
--- tests/phpunit/tests/post/revisions.php	(revision 35748)
+++ tests/phpunit/tests/post/revisions.php	(working copy)
@@ -1,4 +1,6 @@
 <?php
+// Require the post-meta-revisions plugin until its included in core.
+require( 'src/wp-content/plugins/wp-post-meta-revisions/wp-post-meta-revisions.php' );
 
 /**
  * @group post
@@ -389,4 +391,68 @@
 
 		$this->assertEquals( $revision_ids, array_values( wp_list_pluck( $revisions, 'ID' ) ) );
 	}
+
+	/**
+	 * Preview changes on a published post makes all post meta "live"
+	 * @ticket 20299
+	 */
+	function test_meta_stored_to_preview_autosave(){
+
+		/**
+		 * Set up a user for autosaves.
+		 */
+		$editor_user_id = $this->factory->user->create( array( 'role' => 'editor' ) );
+		$user = new WP_User( $editor_user_id );
+		wp_set_current_user( $editor_user_id );
+
+		$postd = array(
+			'post_author'  => $editor_user_id,
+			'post_content' => 'the content',
+			'post_title'   => 'the title',
+			'post_status'  => 'publish',
+		);
+		/**
+		 * Insert a test post.
+		 */
+		$post_id = self::factory()->post->create( $postd );
+
+		/**
+		 * Add some post meta.
+		 */
+		update_post_meta( $post_id, 'publish_meta_test', 'original' );
+
+		/**
+		 * Revision the 'publish_meta_test' meta.
+		 */
+		add_filter( 'wp_post_revision_meta_keys', function( $keys ) {
+			$keys[] = 'publish_meta_test';
+			return $keys;
+		} );
+
+		/**
+		 * Set up $_POST for autosave.
+		 */
+		$_POST['post_ID']           = $post_id;
+		$_POST['post_type']         = 'post';
+		$_POST['post_title']        = 'new title';
+		$_POST['publish_meta_test'] = 'new_value';
+
+		/**
+		 * Create an autosave
+		 */
+		$id = wp_create_post_autosave( $post_id );
+
+		/**
+		 * Verify the new meta value was autosaved.
+		 */
+		$revisioned_meta = get_post_meta( $id, 'publish_meta_test', true );
+		$this->assertEquals( $revisioned_meta[0], 'new_value' );
+
+		/**
+		 * Clean up.
+		 */
+		wp_delete_post( $post_id );
+		wp_delete_post( $id );
+		wp_delete_post( $post_id );
+	}
 }
