Index: src/wp-includes/class.wp-dependencies.php
===================================================================
--- src/wp-includes/class.wp-dependencies.php	(revision 36543)
+++ src/wp-includes/class.wp-dependencies.php	(working copy)
@@ -98,22 +98,7 @@
 
 		foreach ( $this->to_do as $key => $handle ) {
 			if ( !in_array($handle, $this->done, true) && isset($this->registered[$handle]) ) {
-
 				/*
-				 * A single item may alias a set of items, by having dependencies,
-				 * but no source. Queuing the item queues the dependencies.
-				 *
-				 * Example: The extending class WP_Scripts is used to register 'scriptaculous' as a set of registered handles:
-				 *   <code>add( 'scriptaculous', false, array( 'scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls' ) );</code>
-				 *
-				 * The src property is false.
-				 */
-				if ( ! $this->registered[$handle]->src ) {
-					$this->done[] = $handle;
-					continue;
-				}
-
-				/*
 				 * Attempt to process the item. If successful,
 				 * add the handle to the done array.
 				 *
Index: src/wp-includes/class.wp-styles.php
===================================================================
--- src/wp-includes/class.wp-styles.php	(revision 36543)
+++ src/wp-includes/class.wp-styles.php	(working copy)
@@ -72,11 +72,19 @@
 		else
 			$media = 'all';
 
-		$href = $this->_css_href( $obj->src, $ver, $handle );
-		if ( empty( $href ) ) {
-			// Turns out there is nothing to print.
+		if ( ! $obj->src ) {
+			if ( $inline_style = $this->print_inline_style( $handle, false ) ) {
+				$inline_style = sprintf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\n", esc_attr( $handle ), $inline_style );
+				if ( $this->do_concat ) {
+					$this->print_html .= $inline_style;
+				} else {
+					echo $inline_style;
+				}
+			}
 			return true;
 		}
+
+		$href = $this->_css_href( $obj->src, $ver, $handle );
 		$rel = isset($obj->extra['alt']) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet';
 		$title = isset($obj->extra['title']) ? "title='" . esc_attr( $obj->extra['title'] ) . "'" : '';
 
Index: tests/phpunit/tests/dependencies/scripts.php
===================================================================
--- tests/phpunit/tests/dependencies/scripts.php	(revision 36549)
+++ tests/phpunit/tests/dependencies/scripts.php	(working copy)
@@ -166,4 +166,20 @@
 		$this->assertFalse( wp_register_script( 'duplicate-handler', 'http://example.com' ) );
 	}
 
+	/**
+	 * @ticket 35229
+	 */
+	function test_wp_register_script_with_handle_without_source() {
+		$expected  = "<script type='text/javascript' src='http://example.com?ver=1'></script>\n";
+		$expected .= "<script type='text/javascript' src='http://example.com?ver=2'></script>\n";
+
+		wp_register_script( 'handle-one', 'http://example.com', array(), 1 );
+		wp_register_script( 'handle-two', 'http://example.com', array(), 2 );
+		wp_register_script( 'handle-three', false, array( 'handle-one', 'handle-two' ) );
+
+		wp_enqueue_script( 'handle-three' );
+
+		$this->assertEquals( $expected, get_echo( 'wp_print_scripts' ) );
+	}
+
 }
Index: tests/phpunit/tests/dependencies/styles.php
===================================================================
--- tests/phpunit/tests/dependencies/styles.php	(revision 36547)
+++ tests/phpunit/tests/dependencies/styles.php	(working copy)
@@ -234,9 +234,31 @@
 	 *
 	 * @ticket 31126
 	 */
-	function test_wp_register_style(){
+	function test_wp_register_style() {
 		$this->assertTrue( wp_register_style( 'duplicate-handler', 'http://example.com' ) );
 		$this->assertFalse( wp_register_style( 'duplicate-handler', 'http://example.com' ) );
 	}
 
+	/**
+	 * @ticket 35229
+	 */
+	function test_wp_add_inline_style_for_handle_without_source() {
+		$style  = "a { color: blue; }";
+
+		$expected  = "<link rel='stylesheet' id='handle-one-css'  href='http://example.com?ver=1' type='text/css' media='all' />\n";
+		$expected .= "<link rel='stylesheet' id='handle-two-css'  href='http://example.com?ver=1' type='text/css' media='all' />\n";
+		$expected .= "<style id='handle-three-inline-css' type='text/css'>\n";
+		$expected .= "$style\n";
+		$expected .= "</style>\n";
+
+		wp_register_style( 'handle-one', 'http://example.com', array(), 1 );
+		wp_register_style( 'handle-two', 'http://example.com', array(), 1 );
+		wp_register_style( 'handle-three', false, array( 'handle-one', 'handle-two' ) );
+
+		wp_enqueue_style( 'handle-three' );
+		wp_add_inline_style( 'handle-three', $style );
+
+		$this->assertEquals( $expected, get_echo( 'wp_print_styles' ) );
+	}
+
 }
