diff --git a/core/lib/Drupal/Core/Render/ElementInfo.php b/core/lib/Drupal/Core/Render/ElementInfo.php
index 8d6a3f2..6b7fc41 100644
--- a/core/lib/Drupal/Core/Render/ElementInfo.php
+++ b/core/lib/Drupal/Core/Render/ElementInfo.php
@@ -59,7 +59,42 @@ protected function buildInfo() {
     // Allow modules to alter the element type defaults.
     $this->moduleHandler->alter('element_info', $info);
 
+    // Merge in #base_types. We do this after the alter step so that child
+    // #types inherit alterations from parents.
+    foreach ($info as &$element) {
+      $element = $this->mergeBaseInfo($element, $info);
+    }
+
     return $info;
   }
 
+  /**
+   * Merges #base_type element information into the current element information.
+   *
+   * This method merges information recusively so that if the information
+   * returned for the current #base_type references a #base_type itself then
+   * that will also be merged in.
+   *
+   * @param array $element
+   *   The element to marge #base_type information into.
+   * @param array $info
+   *   The fully populated and altered element information registry as built by
+   *   implementations of hook_element_info().
+   *
+   * @return array
+   *   An array of element information with corresponding #base_type data merged
+   *   into its existing #type data.
+   */
+  protected function mergeBaseInfo($element, $info) {
+    $merge = array();
+    if (isset($element['#base_type'])) {
+      $base_type = $element['#base_type'];
+      if (isset($info[$base_type])) {
+        // We need to go deeper.
+        $merge = $this->mergeBaseInfo($info[$base_type], $info);
+      }
+    }
+    return $element + $merge;
+  }
+
 }
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 3efe9ad..a9dfd2d 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -483,9 +483,6 @@ function filter_process_format($element) {
     }
   }
 
-  $element['value']['#type'] = $element['#base_type'];
-  $element['value'] += element_info($element['#base_type']);
-
   // Turn original element into a text format wrapper.
   $element['#attached']['library'][] = 'filter/drupal.filter';
 
