diff --git a/core/lib/Drupal/Component/Utility/Xss.php b/core/lib/Drupal/Component/Utility/Xss.php
index 9081fae..7a06e124 100644
--- a/core/lib/Drupal/Component/Utility/Xss.php
+++ b/core/lib/Drupal/Component/Utility/Xss.php
@@ -192,7 +192,6 @@ protected static function attributes($attributes) {
     $mode = 0;
     $attribute_name = '';
     $skip = FALSE;
-    $skip_protocol_filtering = FALSE;
 
     while (strlen($attributes) != 0) {
       // Was the last operation successful?
@@ -204,20 +203,6 @@ protected static function attributes($attributes) {
           if (preg_match('/^([-a-zA-Z]+)/', $attributes, $match)) {
             $attribute_name = strtolower($match[1]);
             $skip = ($attribute_name == 'style' || substr($attribute_name, 0, 2) == 'on');
-
-            // Values for attributes of type URI should be filtered for
-            // potentially malicious protocols (for example, an href-attribute
-            // starting with "javascript:"). However, for some non-URI
-            // attributes performing this filtering causes valid and safe data
-            // to be mangled. We prevent this by skipping protocol filtering on
-            // such attributes.
-            // @see \Drupal\Component\Utility\UrlHelper::filterBadProtocol()
-            // @see http://www.w3.org/TR/html4/index/attributes.html
-            $skip_protocol_filtering = substr($attribute_name, 0, 5) === 'data-' || in_array($attribute_name, array(
-              'title',
-              'alt',
-            ));
-
             $working = $mode = 1;
             $attributes = preg_replace('/^[-a-zA-Z]+/', '', $attributes);
           }
@@ -243,7 +228,7 @@ protected static function attributes($attributes) {
         case 2:
           // Attribute value, a URL after href= for instance.
           if (preg_match('/^"([^"]*)"(\s+|$)/', $attributes, $match)) {
-            $thisval = $skip_protocol_filtering ? $match[1] : UrlHelper::filterBadProtocol($match[1]);
+            $thisval = UrlHelper::filterBadProtocol($match[1]);
 
             if (!$skip) {
               $attributes_array[] = "$attribute_name=\"$thisval\"";
@@ -255,7 +240,7 @@ protected static function attributes($attributes) {
           }
 
           if (preg_match("/^'([^']*)'(\s+|$)/", $attributes, $match)) {
-            $thisval = $skip_protocol_filtering ? $match[1] : UrlHelper::filterBadProtocol($match[1]);
+            $thisval = UrlHelper::filterBadProtocol($match[1]);
 
             if (!$skip) {
               $attributes_array[] = "$attribute_name='$thisval'";
@@ -266,7 +251,7 @@ protected static function attributes($attributes) {
           }
 
           if (preg_match("%^([^\s\"']+)(\s+|$)%", $attributes, $match)) {
-            $thisval = $skip_protocol_filtering ? $match[1] : UrlHelper::filterBadProtocol($match[1]);
+            $thisval = UrlHelper::filterBadProtocol($match[1]);
 
             if (!$skip) {
               $attributes_array[] = "$attribute_name=\"$thisval\"";
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php
index 3b43147..dea2989 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php
@@ -12,6 +12,7 @@
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldItemInterface;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -121,8 +122,8 @@ protected function viewValue(FieldItemInterface $item) {
     // either displayed in its configured form (loaded directly from config
     // storage by LanguageManager::getLanguages()) or in its native language
     // name. That only depends on formatter settings and no language condition.
-    $languages = $this->getSetting('native_language') ? $this->languageManager->getNativeLanguages() : $this->languageManager->getLanguages();
-    return $item->language ? SafeMarkup::checkPlain($languages[$item->language->getId()]->getName()) : '';
+    $languages = $this->getSetting('native_language') ? $this->languageManager->getNativeLanguages(LanguageInterface::STATE_ALL) : $this->languageManager->getLanguages(LanguageInterface::STATE_ALL);
+    return $item->language && isset($languages[$item->language->getId()]) ? SafeMarkup::checkPlain($languages[$item->language->getId()]->getName()) : '';
   }
 
 }
diff --git a/core/lib/Drupal/Core/Mail/MailManagerInterface.php b/core/lib/Drupal/Core/Mail/MailManagerInterface.php
index ded236b..5cb446a 100644
--- a/core/lib/Drupal/Core/Mail/MailManagerInterface.php
+++ b/core/lib/Drupal/Core/Mail/MailManagerInterface.php
@@ -116,7 +116,7 @@
    *   hook_mail_alter() may cancel sending by setting $message['send'] to
    *   FALSE.
    *
-   * @return array
+   * @return string
    *   The $message array structure containing all details of the message. If
    *   already sent ($send = TRUE), then the 'result' element will contain the
    *   success indicator of the email, failure being already written to the
diff --git a/core/lib/Drupal/Core/Session/SessionManager.php b/core/lib/Drupal/Core/Session/SessionManager.php
index 3c71930..52b3542 100644
--- a/core/lib/Drupal/Core/Session/SessionManager.php
+++ b/core/lib/Drupal/Core/Session/SessionManager.php
@@ -174,7 +174,6 @@ protected function startNow() {
     // Restore session data.
     if ($this->startedLazy) {
       $_SESSION = $session_data;
-      $this->loadSession();
     }
 
     return $result;
diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php
index 44b0a2a..a2b1f59 100644
--- a/core/lib/Drupal/Core/Template/TwigExtension.php
+++ b/core/lib/Drupal/Core/Template/TwigExtension.php
@@ -215,8 +215,6 @@ public function getUrl($name, $parameters = array(), $options = array()) {
    *
    * @return string
    *   The generated absolute URL for the given path.
-   *
-   * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 8.0.0.
    */
   public function getUrlFromPath($path, $options = array()) {
     $options['absolute'] = TRUE;
diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js
index 1cc7515..d0c6241 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -158,7 +158,7 @@
       if (this.tableSettings.hasOwnProperty(group)) { // Find the first field in this group.
         for (var d in this.tableSettings[group]) {
           if (this.tableSettings[group].hasOwnProperty(d)) {
-            var field = $table.find('.' + this.tableSettings[group][d].target).eq(0);
+            var field = $table.find('.' + this.tableSettings[group][d].target + ':first');
             if (field.length && this.tableSettings[group][d].hidden) {
               hidden = this.tableSettings[group][d].hidden;
               cell = field.closest('td');
@@ -311,18 +311,18 @@
     var self = this;
     var $item = $(item);
     // Add a class to the title link
-    $item.find('td').eq(0).find('a').addClass('menu-item__link');
+    $item.find('td:first a').addClass('menu-item__link');
     // Create the handle.
     var handle = $('<a href="#" class="tabledrag-handle"><div class="handle">&nbsp;</div></a>').attr('title', Drupal.t('Drag to re-order'));
     // Insert the handle after indentations (if any).
-    var $indentationLast = $item.find('td').eq(0).find('.js-indentation').eq(-1);
+    var $indentationLast = $item.find('td:first .js-indentation:last');
     if ($indentationLast.length) {
       $indentationLast.after(handle);
       // Update the total width of indentation in this entire table.
       self.indentCount = Math.max($item.find('.js-indentation').length, self.indentCount);
     }
     else {
-      $item.find('td').eq(0).prepend(handle);
+      $item.find('td:first').prepend(handle);
     }
 
     if (Modernizr.touch) {
@@ -417,7 +417,7 @@
           break;
         case 40: // Down arrow.
         case 63233: // Safari down arrow.
-          var $nextRow = $(self.rowObject.group).eq(-1).next('tr').eq(0);
+          var $nextRow = $(self.rowObject.group).filter(':last').next('tr').eq(0);
           var nextRow = $nextRow.get(0);
           while (nextRow && $nextRow.is(':hidden')) {
             $nextRow = $(nextRow).next('tr').eq(0);
@@ -436,7 +436,7 @@
                 $(nextGroup.group).each(function () {
                   groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight;
                 });
-                var nextGroupRow = $(nextGroup.group).eq(-1).get(0);
+                var nextGroupRow = $(nextGroup.group).filter(':last').get(0);
                 self.rowObject.swap('after', nextGroupRow);
                 // No need to check for indentation, 0 is the only valid one.
                 window.scrollBy(0, parseInt(groupHeight, 10));
@@ -808,7 +808,7 @@
         // Use the first row in the table as source, because it's guaranteed to
         // be at the root level. Find the first item, then compare this row
         // against it as a sibling.
-        sourceRow = $(this.table).find('tr.draggable').eq(0).get(0);
+        sourceRow = $(this.table).find('tr.draggable:first').get(0);
         if (sourceRow === this.rowObject.element) {
           sourceRow = $(this.rowObject.group[this.rowObject.group.length - 1]).next('tr.draggable').get(0);
         }
@@ -1147,7 +1147,7 @@
     // Determine the valid indentations interval if not available yet.
     if (!this.interval) {
       var prevRow = $(this.element).prev('tr').get(0);
-      var nextRow = $group.eq(-1).next('tr').get(0);
+      var nextRow = $group.filter(':last').next('tr').get(0);
       this.interval = this.validIndentInterval(prevRow, nextRow);
     }
 
@@ -1160,11 +1160,11 @@
     for (var n = 1; n <= Math.abs(indentDiff); n++) {
       // Add or remove indentations.
       if (indentDiff < 0) {
-        $group.find('.js-indentation').eq(0).remove();
+        $group.find('.js-indentation:first').remove();
         this.indents--;
       }
       else {
-        $group.find('td').eq(0).prepend(Drupal.theme('tableDragIndentation'));
+        $group.find('td:first').prepend(Drupal.theme('tableDragIndentation'));
         this.indents++;
       }
     }
@@ -1244,7 +1244,7 @@
    */
   Drupal.tableDrag.prototype.row.prototype.markChanged = function () {
     var marker = Drupal.theme('tableDragChangedMarker');
-    var cell = $(this.element).find('td').eq(0);
+    var cell = $(this.element).find('td:first');
     if (cell.find('abbr.tabledrag-changed').length === 0) {
       cell.append(marker);
     }
diff --git a/core/misc/tableresponsive.js b/core/misc/tableresponsive.js
index e13acce..93b7f83 100644
--- a/core/misc/tableresponsive.js
+++ b/core/misc/tableresponsive.js
@@ -89,7 +89,7 @@
           var $header = $(this);
           var position = $header.prevAll('th').length;
           self.$table.find('tbody tr').each(function () {
-            var $cells = $(this).find('td').eq(position);
+            var $cells = $(this).find('td:eq(' + position + ')');
             $cells.show();
             // Keep track of the revealed cells, so they can be hidden later.
             self.$revealedCells = $().add(self.$revealedCells).add($cells);
diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js
index 1b51850..faed095 100644
--- a/core/misc/vertical-tabs.js
+++ b/core/misc/vertical-tabs.js
@@ -55,8 +55,8 @@
           }
         });
 
-        $(tab_list).find('> li').eq(0).addClass('first');
-        $(tab_list).find('> li').eq(-1).addClass('last');
+        $(tab_list).find('> li:first').addClass('first');
+        $(tab_list).find('> li:last').addClass('last');
 
         if (!tab_focus) {
           // If the current URL has a fragment and one of the tabs contains an
@@ -66,7 +66,7 @@
             tab_focus = $locationHash.closest('.vertical-tabs__pane');
           }
           else {
-            tab_focus = $this.find('> .vertical-tabs__pane').eq(0);
+            tab_focus = $this.find('> .vertical-tabs__pane:first');
           }
         }
         if (tab_focus.length) {
@@ -102,7 +102,7 @@
       if (event.keyCode === 13) {
         self.focus();
         // Set focus on the first input field of the visible details/tab pane.
-        $(".vertical-tabs__pane :input:visible:enabled").eq(0).trigger('focus');
+        $(".vertical-tabs__pane :input:visible:enabled:first").trigger('focus');
       }
     });
 
@@ -154,7 +154,7 @@
       // actual DOM element order as jQuery implements sortOrder, but not as public
       // method.
       this.item.parent().children('.vertical-tabs__menu-item').removeClass('first')
-        .filter(':visible').eq(0).addClass('first');
+        .filter(':visible:first').addClass('first');
       // Display the details element.
       this.details.removeClass('vertical-tab--hidden').show();
       // Focus this tab.
@@ -172,11 +172,11 @@
       // actual DOM element order as jQuery implements sortOrder, but not as public
       // method.
       this.item.parent().children('.vertical-tabs__menu-item').removeClass('first')
-        .filter(':visible').eq(0).addClass('first');
+        .filter(':visible:first').addClass('first');
       // Hide the details element.
       this.details.addClass('vertical-tab--hidden').hide();
       // Focus the first visible tab (if there is one).
-      var $firstTab = this.details.siblings('.vertical-tabs__pane:not(.vertical-tab--hidden)').eq(0);
+      var $firstTab = this.details.siblings('.vertical-tabs__pane:not(.vertical-tab--hidden):first');
       if ($firstTab.length) {
         $firstTab.data('verticalTab').focus();
       }
diff --git a/core/modules/block/js/block.js b/core/modules/block/js/block.js
index 3a42f37..2b727c4 100644
--- a/core/modules/block/js/block.js
+++ b/core/modules/block/js/block.js
@@ -99,7 +99,7 @@
           tableDrag.rowObject = new tableDrag.row(row);
 
           // Find the correct region and insert the row as the last in the region.
-          table.find('.region-' + select[0].value + '-message').nextUntil('.region-message').eq(-1).before(row);
+          table.find('.region-' + select[0].value + '-message').nextUntil('.region-message').last().before(row);
 
           // Modify empty regions with added or removed fields.
           checkEmptyRegions(table, row);
diff --git a/core/modules/block_content/block_content.routing.yml b/core/modules/block_content/block_content.routing.yml
index 3542ca8..1c78f0c 100644
--- a/core/modules/block_content/block_content.routing.yml
+++ b/core/modules/block_content/block_content.routing.yml
@@ -2,7 +2,7 @@ entity.block_content_type.collection:
   path: '/admin/structure/block/block-content/types'
   defaults:
     _entity_list: 'block_content_type'
-    _title: 'Custom block library'
+    _title: 'Edit'
   requirements:
     _permission: 'administer blocks'
 
diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index a44f49f..f9eebf2 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -210,10 +210,9 @@
           i = inputs.length;
           if (inputs.length) {
             var toggleClick = true;
-            var lock = $('<button class="lock link">' + Drupal.t('Unlock') + '</button>').on('click', function (e) {
-              e.preventDefault();
+            var lock = $('<div class="lock"></div>').on('click', function () {
               if (toggleClick) {
-                $(this).addClass('unlocked').html(Drupal.t('Lock'));
+                $(this).addClass('unlocked');
                 $(hooks[i - 1]).attr('class',
                   locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook up' : 'hook'
                 );
@@ -222,7 +221,7 @@
                 );
               }
               else {
-                $(this).removeClass('unlocked').html(Drupal.t('Unlock'));
+                $(this).removeClass('unlocked');
                 $(hooks[i - 1]).attr('class',
                   locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook both' : 'hook down'
                 );
diff --git a/core/modules/color/css/color.admin.css b/core/modules/color/css/color.admin.css
index e904c85..5da8c35 100644
--- a/core/modules/color/css/color.admin.css
+++ b/core/modules/color/css/color.admin.css
@@ -63,7 +63,6 @@
   height: 19px;
   background: url(../images/lock.png) no-repeat 50% 0;
   cursor: pointer;
-  text-indent: -9999px;
 }
 [dir="rtl"] #palette .lock {
   float: right;
diff --git a/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php b/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php
index dc68a29..2e0a241 100644
--- a/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php
+++ b/core/modules/config_translation/src/Controller/ConfigTranslationEntityListBuilder.php
@@ -67,7 +67,7 @@ public function render() {
    */
   public function buildRow(EntityInterface $entity) {
     $row['label']['data'] = $this->getLabel($entity);
-    $row['label']['class'][] = 'table-filter-text-source';
+    $row['label']['class'] = 'table-filter-text-source';
     return $row + parent::buildRow($entity);
   }
 
diff --git a/core/modules/contextual/js/contextual.js b/core/modules/contextual/js/contextual.js
index 1e27ec4..e00b011 100644
--- a/core/modules/contextual/js/contextual.js
+++ b/core/modules/contextual/js/contextual.js
@@ -64,7 +64,7 @@
 
     // Create a model and the appropriate views.
     var model = new contextual.StateModel({
-      title: $region.find('h2').eq(0).text().trim()
+      title: $region.find('h2:first').text().trim()
     });
     var viewOptions = $.extend({el: $contextual, model: model}, options);
     contextual.views.push({
diff --git a/core/modules/editor/js/editor.formattedTextEditor.js b/core/modules/editor/js/editor.formattedTextEditor.js
index faf4a6d..75b20b6 100644
--- a/core/modules/editor/js/editor.formattedTextEditor.js
+++ b/core/modules/editor/js/editor.formattedTextEditor.js
@@ -41,7 +41,7 @@
 
       // Store the actual value of this field. We'll need this to restore the
       // original value when the user discards his modifications.
-      this.$textElement = this.$el.find('.field-item').eq(0);
+      this.$textElement = this.$el.find('.field-item:first');
       this.model.set('originalValue', this.$textElement.html());
     },
 
diff --git a/core/modules/editor/src/EditorXssFilter/Standard.php b/core/modules/editor/src/EditorXssFilter/Standard.php
index 43ef797..b34e349 100644
--- a/core/modules/editor/src/EditorXssFilter/Standard.php
+++ b/core/modules/editor/src/EditorXssFilter/Standard.php
@@ -7,9 +7,7 @@
 
 namespace Drupal\editor\EditorXssFilter;
 
-use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\Xss;
-use Drupal\Component\Utility\SafeMarkup;
 use Drupal\filter\FilterFormatInterface;
 use Drupal\editor\EditorXssFilterInterface;
 
@@ -87,39 +85,7 @@ public static function filterXss($html, FilterFormatInterface $format, FilterFor
     // Also blacklist tags that are explicitly forbidden in either text format.
     $blacklisted_tags = array_merge($blacklisted_tags, $forbidden_tags);
 
-    $output = static::filter($html, $blacklisted_tags);
-
-    // Since data-attributes can contain encoded HTML markup that could be
-    // decoded and interpreted by editors, we need to apply XSS filtering to
-    // their contents.
-    return static::filterXssDataAttributes($output);
-  }
-
-  /**
-   * Applies a very permissive XSS/HTML filter to data-attributes.
-   *
-   * @param string $html
-   *   The string to apply the data-attributes filtering to.
-   *
-   * @return string
-   *   The filtered string.
-   */
-  protected static function filterXssDataAttributes($html) {
-    if (stristr($html, 'data-') !== FALSE) {
-      $dom = Html::load($html);
-      $xpath = new \DOMXPath($dom);
-      foreach ($xpath->query('//@*[starts-with(name(.), "data-")]') as $node) {
-        // The data-attributes contain an HTML-encoded value, so we need to
-        // decode the value, apply XSS filtering and then re-save as encoded
-        // value. There is no need to explicitly decode $node->value, since the
-        // DOMAttr::value getter returns the decoded value.
-        $value = Xss::filterAdmin($node->value);
-        $node->value = SafeMarkup::checkPlain($value);
-      }
-      $html = Html::serialize($dom);
-    }
-
-    return $html;
+    return static::filter($html, $blacklisted_tags);
   }
 
 
diff --git a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php
index 13c8311..ee25b00 100644
--- a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php
+++ b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php
@@ -512,17 +512,6 @@ public function providerTestFilterXss() {
     // sites, it only forbids linking to any protocols other than those that are
     // whitelisted.
 
-    // Test XSS filtering on data-attributes.
-    // @see \Drupal\editor\EditorXssFilter::filterXssDataAttributes()
-
-    // The following two test cases verify that XSS attack vectors are filtered.
-    $data[] = array('<img src="butterfly.jpg" data-caption="&lt;script&gt;alert();&lt;/script&gt;" />', '<img src="butterfly.jpg" data-caption="alert();" />');
-    $data[] = array('<img src="butterfly.jpg" data-caption="&lt;EMBED SRC=&quot;http://ha.ckers.org/xss.swf&quot; AllowScriptAccess=&quot;always&quot;&gt;&lt;/EMBED&gt;" />', '<img src="butterfly.jpg" data-caption="" />');
-
-    // When including HTML-tags as visible content, they are double-escaped.
-    // This test case ensures that we leave that content unchanged.
-    $data[] = array('<img src="butterfly.jpg" data-caption="&amp;lt;script&amp;gt;alert();&amp;lt;/script&amp;gt;" />', '<img src="butterfly.jpg" data-caption="&amp;lt;script&amp;gt;alert();&amp;lt;/script&amp;gt;" />');
-
     return $data;
   }
 
diff --git a/core/modules/filter/src/Tests/FilterUnitTest.php b/core/modules/filter/src/Tests/FilterUnitTest.php
index d2b515b..87eb773 100644
--- a/core/modules/filter/src/Tests/FilterUnitTest.php
+++ b/core/modules/filter/src/Tests/FilterUnitTest.php
@@ -9,8 +9,6 @@
 
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\editor\EditorXssFilter\Standard;
-use Drupal\filter\Entity\FilterFormat;
 use Drupal\filter\FilterPluginCollection;
 use Drupal\simpletest\KernelTestBase;
 
@@ -178,74 +176,6 @@ function testCaptionFilter() {
     $output = $test($input);
     $this->assertIdentical($expected, $output->getProcessedText());
     $this->assertIdentical($attached_library, $output->getAssets());
-
-    // So far we've tested that the caption filter works correctly. But we also
-    // want to make sure that it works well in tandem with the "Limit allowed
-    // HTML tags" filter, which it is typically used with.
-    $html_filter = $this->filters['filter_html'];
-    $html_filter->setConfiguration(array(
-      'settings' => array(
-        'allowed_html' => '<img>',
-        'filter_html_help' => 1,
-        'filter_html_nofollow' => 0,
-      )
-    ));
-    $test_with_html_filter = function ($input) use ($filter, $html_filter) {
-      // 1. Apply HTML filter's processing step.
-      $output = $html_filter->process($input, 'und');
-      // 2. Apply caption filter's processing step.
-      $output = $filter->process($output, 'und');
-      return $output->getProcessedText();
-    };
-    // Editor XSS filter.
-    $test_editor_xss_filter = function ($input) {
-      $dummy_filter_format = FilterFormat::create();
-      return Standard::filterXss($input, $dummy_filter_format);
-    };
-
-    // All the tricky cases encountered at https://drupal.org/node/2105841.
-    // A plain URL preceded by text.
-    $input = '<img data-caption="See http://drupal.org" src="llama.jpg" />';
-    $expected = '<figure><img src="llama.jpg" /><figcaption>See http://drupal.org</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
-
-    // An anchor.
-    $input = '<img data-caption="This is a &lt;a href=&quot;http://drupal.org&quot;&gt;quick&lt;/a&gt; test…" src="llama.jpg" />';
-    $expected = '<figure><img src="llama.jpg" /><figcaption>This is a <a href="http://drupal.org">quick</a> test…</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
-
-    // A plain URL surrounded by parentheses.
-    $input = '<img data-caption="(http://drupal.org)" src="llama.jpg" />';
-    $expected = '<figure><img src="llama.jpg" /><figcaption>(http://drupal.org)</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
-
-    // A source being credited.
-    $input = '<img data-caption="Source: Wikipedia" src="llama.jpg" />';
-    $expected = '<figure><img src="llama.jpg" /><figcaption>Source: Wikipedia</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
-
-    // A source being credited, without a space after the colon.
-    $input = '<img data-caption="Source:Wikipedia" src="llama.jpg" />';
-    $expected = '<figure><img src="llama.jpg" /><figcaption>Source:Wikipedia</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
-
-    // A pretty crazy edge case where we have two colons.
-    $input = '<img data-caption="Interesting (Scope resolution operator ::)" src="llama.jpg" />';
-    $expected = '<figure><img src="llama.jpg" /><figcaption>Interesting (Scope resolution operator ::)</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $this->assertIdentical($input, $test_editor_xss_filter($input));
-
-    // An evil anchor (to ensure XSS filtering is applied to the caption also).
-    $input = '<img data-caption="This is an &lt;a href=&quot;javascript:alert();&quot;&gt;evil&lt;/a&gt; test…" src="llama.jpg" />';
-    $expected = '<figure><img src="llama.jpg" /><figcaption>This is an <a href="alert();">evil</a> test…</figcaption></figure>';
-    $this->assertIdentical($expected, $test_with_html_filter($input));
-    $expected_xss_filtered = '<img data-caption="This is an &lt;a href=&quot;alert();&quot;&gt;evil&lt;/a&gt; test…" src="llama.jpg" />';
-    $this->assertIdentical($expected_xss_filtered, $test_editor_xss_filter($input));
   }
 
   /**
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 2e86973..0418c72 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -11,7 +11,6 @@
 use Drupal\file\Entity\File;
 use Drupal\field\FieldStorageConfigInterface;
 use Drupal\field\FieldConfigInterface;
-use Drupal\image\Entity\ImageStyle;
 
 /**
  * Image style constant for user presets in the database.
@@ -214,7 +213,7 @@ function image_file_predelete(File $file) {
  *   The Drupal file path to the original image.
  */
 function image_path_flush($path) {
-  $styles = ImageStyle::loadMultiple();
+  $styles = entity_load_multiple('image_style');
   foreach ($styles as $style) {
     $style->flush($path);
   }
@@ -229,7 +228,7 @@ function image_path_flush($path) {
  *   Array of image styles both key and value are set to style name.
  */
 function image_style_options($include_empty = TRUE) {
-  $styles = ImageStyle::loadMultiple();
+  $styles = entity_load_multiple('image_style');
   $options = array();
   if ($include_empty && !empty($styles)) {
     $options[''] = t('- None -');
@@ -271,7 +270,7 @@ function image_style_options($include_empty = TRUE) {
  *   - attributes: Associative array of attributes to be placed in the img tag.
  */
 function template_preprocess_image_style(&$variables) {
-  $style = ImageStyle::load($variables['style_name']);
+  $style = entity_load('image_style', $variables['style_name']);
 
   // Determine the dimensions of the styled image.
   $dimensions = array(
diff --git a/core/modules/image/src/Form/ImageEffectFormBase.php b/core/modules/image/src/Form/ImageEffectFormBase.php
index 7b7f25b..5aaf1a6 100644
--- a/core/modules/image/src/Form/ImageEffectFormBase.php
+++ b/core/modules/image/src/Form/ImageEffectFormBase.php
@@ -97,7 +97,6 @@ public function buildForm(array $form, FormStateInterface $form_state, ImageStyl
       '#type' => 'link',
       '#title' => $this->t('Cancel'),
       '#url' => $this->imageStyle->urlInfo('edit-form'),
-      '#attributes' => ['class' => ['button']],
     );
     return $form;
   }
diff --git a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php
index 0e12d10..38a163c 100644
--- a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php
+++ b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\image\Plugin\Field\FieldFormatter;
 
-use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -46,13 +45,6 @@ class ImageFormatter extends ImageFormatterBase implements ContainerFactoryPlugi
   protected $linkGenerator;
 
   /**
-   * The image style entity storage.
-   *
-   * @var \Drupal\Core\Entity\EntityStorageInterface
-   */
-  protected $imageStyleStorage;
-
-  /**
    * Constructs an ImageFormatter object.
    *
    * @param string $plugin_id
@@ -74,11 +66,10 @@ class ImageFormatter extends ImageFormatterBase implements ContainerFactoryPlugi
    * @param \Drupal\Core\Utility\LinkGeneratorInterface $link_generator
    *   The link generator service.
    */
-  public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AccountInterface $current_user, LinkGeneratorInterface $link_generator, EntityStorageInterface $image_style_storage) {
+  public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AccountInterface $current_user, LinkGeneratorInterface $link_generator) {
     parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
     $this->currentUser = $current_user;
     $this->linkGenerator = $link_generator;
-    $this->imageStyleStorage = $image_style_storage;
   }
 
   /**
@@ -94,8 +85,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $configuration['view_mode'],
       $configuration['third_party_settings'],
       $container->get('current_user'),
-      $container->get('link_generator'),
-      $container->get('entity.manager')->getStorage('image_style')
+      $container->get('link_generator')
     );
   }
 
@@ -202,7 +192,7 @@ public function viewElements(FieldItemListInterface $items) {
     // Collect cache tags to be added for each item in the field.
     $cache_tags = array();
     if (!empty($image_style_setting)) {
-      $image_style = $this->imageStyleStorage->load($image_style_setting);
+      $image_style = entity_load('image_style', $image_style_setting);
       $cache_tags = $image_style->getCacheTags();
     }
 
diff --git a/core/modules/image/src/Tests/FileMoveTest.php b/core/modules/image/src/Tests/FileMoveTest.php
index 34c54a7..6a4454b 100644
--- a/core/modules/image/src/Tests/FileMoveTest.php
+++ b/core/modules/image/src/Tests/FileMoveTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\image\Tests;
 
 use Drupal\simpletest\WebTestBase;
-use Drupal\image\Entity\ImageStyle;
 
 /**
  * Tests the file move function for images and image styles.
@@ -32,7 +31,7 @@ function testNormal() {
     $file = entity_create('file', (array) current($this->drupalGetTestFiles('image')));
 
     // Create derivative image.
-    $styles = ImageStyle::loadMultiple();
+    $styles = entity_load_multiple('image_style');
     $style = reset($styles);
     $original_uri = $file->getFileUri();
     $derivative_uri = $style->buildUri($original_uri);
diff --git a/core/modules/image/src/Tests/ImageAdminStylesTest.php b/core/modules/image/src/Tests/ImageAdminStylesTest.php
index dedb9b5..6a9a9e5 100644
--- a/core/modules/image/src/Tests/ImageAdminStylesTest.php
+++ b/core/modules/image/src/Tests/ImageAdminStylesTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\image\Tests;
 
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\image\Entity\ImageStyle;
 use Drupal\image\ImageStyleInterface;
 use Drupal\node\Entity\Node;
 
@@ -130,7 +129,7 @@ function testStyle() {
     }
 
     // Load the saved image style.
-    $style = ImageStyle::load($style_name);
+    $style = entity_load('image_style', $style_name);
 
     // Ensure that third party settings were added to the config entity.
     // These are added by a hook_image_style_presave() implemented in
@@ -212,7 +211,7 @@ function testStyle() {
     $this->assertEqual($this->getImageCount($style), 0, format_string('Image style %style was flushed after renaming the style and updating the order of effects.', array('%style' => $style->label())));
 
     // Load the style by the new name with the new weights.
-    $style = ImageStyle::load($style_name);
+    $style = entity_load('image_style', $style_name);
 
     // Confirm the new style order was saved.
     $effect_edits_order = array_reverse($effect_edits_order);
@@ -270,7 +269,7 @@ function testStyle() {
     $directory = file_default_scheme() . '://styles/' . $style_name;
     $this->assertFalse(is_dir($directory), format_string('Image style %style directory removed on style deletion.', array('%style' => $style->label())));
 
-    $this->assertFalse(ImageStyle::load($style_name), format_string('Image style %style successfully deleted.', array('%style' => $style->label())));
+    $this->assertFalse(entity_load('image_style', $style_name), format_string('Image style %style successfully deleted.', array('%style' => $style->label())));
 
   }
 
@@ -320,7 +319,7 @@ function testStyleReplacement() {
     $this->drupalGet('node/' . $nid);
 
     // Reload the image style using the new name.
-    $style = ImageStyle::load($new_style_name);
+    $style = entity_load('image_style', $new_style_name);
     $this->assertRaw($style->buildUrl($original_uri), 'Image displayed using style replacement style.');
 
     // Delete the style and choose a replacement style.
@@ -331,7 +330,7 @@ function testStyleReplacement() {
     $message = t('The image style %name has been deleted.', array('%name' => $new_style_label));
     $this->assertRaw($message);
 
-    $replacement_style = ImageStyle::load('thumbnail');
+    $replacement_style = entity_load('image_style', 'thumbnail');
     $this->drupalGet('node/' . $nid);
     $this->assertRaw($replacement_style->buildUrl($original_uri), 'Image displayed using style replacement style.');
   }
@@ -449,7 +448,7 @@ function testConfigImport() {
     $staging->delete('image.style.' . $style_name);
     $this->configImporter()->import();
 
-    $this->assertFalse(ImageStyle::load($style_name), 'Style deleted after config import.');
+    $this->assertFalse(entity_load('image_style', $style_name), 'Style deleted after config import.');
     $this->assertEqual($this->getImageCount($style), 0, 'Image style was flushed after being deleted by config import.');
   }
 
diff --git a/core/modules/image/src/Tests/ImageFieldDisplayTest.php b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
index c112437..47d7712 100644
--- a/core/modules/image/src/Tests/ImageFieldDisplayTest.php
+++ b/core/modules/image/src/Tests/ImageFieldDisplayTest.php
@@ -10,7 +10,6 @@
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\user\RoleInterface;
-use Drupal\image\Entity\ImageStyle;
 
 /**
  * Tests the display of image fields.
@@ -176,7 +175,7 @@ function _testImageFieldFormatters($scheme) {
 
     // Ensure the derivative image is generated so we do not have to deal with
     // image style callback paths.
-    $this->drupalGet(ImageStyle::load('thumbnail')->buildUrl($image_uri));
+    $this->drupalGet(entity_load('image_style', 'thumbnail')->buildUrl($image_uri));
     $image_style = array(
       '#theme' => 'image_style',
       '#uri' => $image_uri,
@@ -194,7 +193,7 @@ function _testImageFieldFormatters($scheme) {
     if ($scheme == 'private') {
       // Log out and try to access the file.
       $this->drupalLogout();
-      $this->drupalGet(ImageStyle::load('thumbnail')->buildUrl($image_uri));
+      $this->drupalGet(entity_load('image_style', 'thumbnail')->buildUrl($image_uri));
       $this->assertResponse('403', 'Access denied to image style thumbnail as anonymous user.');
     }
   }
diff --git a/core/modules/image/src/Tests/ImageStyleFlushTest.php b/core/modules/image/src/Tests/ImageStyleFlushTest.php
index 0a6a5fa..1ebe27b 100644
--- a/core/modules/image/src/Tests/ImageStyleFlushTest.php
+++ b/core/modules/image/src/Tests/ImageStyleFlushTest.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\image\Tests;
 
-use Drupal\image\Entity\ImageStyle;
-
 /**
  * Tests flushing of image styles.
  *
@@ -81,7 +79,7 @@ function testFlush() {
     }
 
     // Load the saved image style.
-    $style = ImageStyle::load($style_name);
+    $style = entity_load('image_style', $style_name);
 
     // Create an image for the 'public' wrapper.
     $image_path = $this->createSampleImage($style, 'public');
diff --git a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php b/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
index 4ae8f0b..c58b3bb 100644
--- a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
+++ b/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\rdf\Tests;
 
-use Drupal\image\Entity\ImageStyle;
 use Drupal\image\Tests\ImageFieldTestBase;
 use Drupal\node\Entity\Node;
 
@@ -97,7 +96,7 @@ function testNodeTeaser() {
 
     // Construct the node and image URIs for testing.
     $node_uri = $this->node->url('canonical', ['absolute' => TRUE]);
-    $image_uri = ImageStyle::load('medium')->buildUrl($this->file->getFileUri());
+    $image_uri = entity_load('image_style', 'medium')->buildUrl($this->file->getFileUri());
 
     // Test relations from node to image.
     $expected_value = array(
diff --git a/core/modules/rdf/src/Tests/StandardProfileTest.php b/core/modules/rdf/src/Tests/StandardProfileTest.php
index d9a31f0..78c08fc 100644
--- a/core/modules/rdf/src/Tests/StandardProfileTest.php
+++ b/core/modules/rdf/src/Tests/StandardProfileTest.php
@@ -8,10 +8,9 @@
 namespace Drupal\rdf\Tests;
 
 use Drupal\Core\Url;
-use Drupal\image\Entity\ImageStyle;
-use Drupal\node\Entity\NodeType;
 use Drupal\node\NodeInterface;
 use Drupal\simpletest\WebTestBase;
+use Drupal\node\Entity\NodeType;
 
 /**
  * Tests the RDF mappings and RDFa markup of the standard profile.
@@ -166,7 +165,7 @@ protected function setUp() {
     // Set URIs.
     // Image.
     $image_file = $this->article->get('field_image')->entity;
-    $this->imageUri = ImageStyle::load('large')->buildUrl($image_file->getFileUri());
+    $this->imageUri = entity_load('image_style', 'large')->buildUrl($image_file->getFileUri());
     // Term.
     $this->termUri = $this->term->url('canonical', array('absolute' => TRUE));
     // Article.
@@ -225,7 +224,7 @@ protected function doFrontPageRdfaTests() {
     // @todo Once the image points to the original instead of the processed
     //   image, move this to testArticleProperties().
     $image_file = $this->article->get('field_image')->entity;
-    $image_uri = ImageStyle::load('medium')->buildUrl($image_file->getFileUri());
+    $image_uri = entity_load('image_style', 'medium')->buildUrl($image_file->getFileUri());
     $expected_value = array(
       'type' => 'uri',
       'value' => $image_uri,
diff --git a/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php b/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php
index b3500fe..bc8cb93 100644
--- a/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php
+++ b/core/modules/responsive_image/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatter.php
@@ -16,6 +16,7 @@
 use Drupal\Core\Url;
 use Drupal\image\Plugin\Field\FieldFormatter\ImageFormatterBase;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\image\Entity\ImageStyle;
 
 /**
  * Plugin for responsive image formatter.
@@ -35,13 +36,6 @@ class ResponsiveImageFormatter extends ImageFormatterBase implements ContainerFa
    */
   protected $responsiveImageStyleStorage;
 
-  /*
-   * The image style entity storage.
-   *
-   * @var \Drupal\Core\Entity\EntityStorageInterface
-   */
-  protected $imageStyleStorage;
-
   /**
    * Constructs a ResponsiveImageFormatter object.
    *
@@ -61,14 +55,11 @@ class ResponsiveImageFormatter extends ImageFormatterBase implements ContainerFa
    *   Any third party settings.
    * @param \Drupal\Core\Entity\EntityStorageInterface $responsive_image_style_storage
    *   The responsive image style storage.
-   * @param \Drupal\Core\Entity\EntityStorageInterface $image_style_storage
-   *   The image style storage.
    */
-  public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityStorageInterface $responsive_image_style_storage, EntityStorageInterface $image_style_storage) {
+  public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityStorageInterface $responsive_image_style_storage) {
     parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
 
     $this->responsiveImageStyleStorage = $responsive_image_style_storage;
-    $this->imageStyleStorage = $image_style_storage;
   }
 
   /**
@@ -83,8 +74,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $configuration['label'],
       $configuration['view_mode'],
       $configuration['third_party_settings'],
-      $container->get('entity.manager')->getStorage('responsive_image_style'),
-      $container->get('entity.manager')->getStorage('image_style')
+      $container->get('entity.manager')->getStorage('responsive_image_style')
     );
   }
 
@@ -232,7 +222,7 @@ public function viewElements(FieldItemListInterface $items) {
       // selected for the smallest screen.
       $fallback_image_style = end($image_styles_to_load);
     }
-    $image_styles = $this->imageStyleStorage->loadMultiple($image_styles_to_load);
+    $image_styles = ImageStyle::loadMultiple($image_styles_to_load);
     foreach ($image_styles as $image_style) {
       $cache_tags = Cache::mergeTags($cache_tags, $image_style->getCacheTags());
     }
diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php
index 6cba2e0..e531b65 100644
--- a/core/modules/simpletest/src/BrowserTestBase.php
+++ b/core/modules/simpletest/src/BrowserTestBase.php
@@ -29,26 +29,14 @@
 use Symfony\Component\HttpFoundation\Request;
 
 /**
- * Provides a test case for functional Drupal tests.
+ * Test case for functional Drupal tests.
  *
- * Note that this class does not yet have feature parity with WebTestBase, so
- * WebTestBase should be used where possible. In particular, this class does
- * not yet have the following features:
- * - verbose output - see https://www.drupal.org/node/2469721
- * - ajax form emulation - see https://www.drupal.org/node/2469713
- *
- * Tests extending BrowserTestBase must exist in the
- * Drupal\Tests\yourmodule\Functional namespace and live in the
- * modules/yourmodule/Tests/Functional directory.
+ * @ingroup testing
  *
  * All BrowserTestBase tests must have two annotations to ensure process
  * isolation:
  * - @runTestsInSeparateProcesses
  * - @preserveGlobalState disabled
- *
- * @ingroup testing
- *
- * @see \Drupal\simpletest\WebTestBase
  */
 abstract class BrowserTestBase extends \PHPUnit_Framework_TestCase {
 
diff --git a/core/modules/system/core.api.php b/core/modules/system/core.api.php
index 14c894a..778cdb3 100644
--- a/core/modules/system/core.api.php
+++ b/core/modules/system/core.api.php
@@ -1866,112 +1866,6 @@ function hook_display_variant_plugin_alter(array &$definitions) {
 }
 
 /**
- * Flush all persistent and static caches.
- *
- * This hook asks your module to clear all of its static caches,
- * in order to ensure a clean environment for subsequently
- * invoked data rebuilds.
- *
- * Do NOT use this hook for rebuilding information. Only use it to flush custom
- * caches.
- *
- * Static caches using drupal_static() do not need to be reset manually.
- * However, all other static variables that do not use drupal_static() must be
- * manually reset.
- *
- * This hook is invoked by drupal_flush_all_caches(). It runs before module data
- * is updated and before hook_rebuild().
- *
- * @see drupal_flush_all_caches()
- * @see hook_rebuild()
- */
-function hook_cache_flush() {
-  if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') {
-    _update_cache_clear();
-  }
-}
-
-/**
- * Rebuild data based upon refreshed caches.
- *
- * This hook allows your module to rebuild its data based on the latest/current
- * module data. It runs after hook_cache_flush() and after all module data has
- * been updated.
- *
- * This hook is only invoked after the system has been completely cleared;
- * i.e., all previously cached data is known to be gone and every API in the
- * system is known to return current information, so your module can safely rely
- * on all available data to rebuild its own.
- *
- * @see hook_cache_flush()
- * @see drupal_flush_all_caches()
- */
-function hook_rebuild() {
-  $themes = \Drupal::service('theme_handler')->listInfo();
-  foreach ($themes as $theme) {
-    _block_rehash($theme->getName());
-  }
-}
-
-/**
- * Alter the configuration synchronization steps.
- *
- * @param array $sync_steps
- *   A one-dimensional array of \Drupal\Core\Config\ConfigImporter method names
- *   or callables that are invoked to complete the import, in the order that
- *   they will be processed. Each callable item defined in $sync_steps should
- *   either be a global function or a public static method. The callable should
- *   accept a $context array by reference. For example:
- *   <code>
- *     function _additional_configuration_step(&$context) {
- *       // Do stuff.
- *       // If finished set $context['finished'] = 1.
- *     }
- *   </code>
- *   For more information on creating batches, see the
- *   @link batch Batch operations @endlink documentation.
- *
- * @see callback_batch_operation()
- * @see \Drupal\Core\Config\ConfigImporter::initialize()
- */
-function hook_config_import_steps_alter(&$sync_steps, \Drupal\Core\Config\ConfigImporter $config_importer) {
-  $deletes = $config_importer->getUnprocessedConfiguration('delete');
-  if (isset($deletes['field.storage.node.body'])) {
-    $sync_steps[] = '_additional_configuration_step';
-  }
-}
-
-/**
- * Alter config typed data definitions.
- *
- * For example you can alter the typed data types representing each
- * configuration schema type to change default labels or form element renderers
- * used for configuration translation.
- *
- * If implementations of this hook add or remove configuration schema a
- * ConfigSchemaAlterException will be thrown. Keep in mind that there are tools
- * that may use the configuration schema for static analysis of configuration
- * files, like the string extractor for the localization system. Such systems
- * won't work with dynamically defined configuration schemas.
- *
- * For adding new data types use configuration schema YAML files instead.
- *
- * @param $definitions
- *   Associative array of configuration type definitions keyed by schema type
- *   names. The elements are themselves array with information about the type.
- *
- * @see \Drupal\Core\Config\TypedConfigManager
- * @see \Drupal\Core\Config\Schema\ConfigSchemaAlterException
- */
-function hook_config_schema_info_alter(&$definitions) {
-  // Enhance the text and date type definitions with classes to generate proper
-  // form elements in ConfigTranslationFormBase. Other translatable types will
-  // appear as a one line textfield.
-  $definitions['text']['form_element_class'] = '\Drupal\config_translation\FormElement\Textarea';
-  $definitions['date_format']['form_element_class'] = '\Drupal\config_translation\FormElement\DateFormat';
-}
-
-/**
  * @} End of "addtogroup hooks".
  */
 
diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php
index d188375..e69a92a 100644
--- a/core/modules/system/entity.api.php
+++ b/core/modules/system/entity.api.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Hooks and documentation related to entities.
+ * Hooks provided the Entity module.
  */
 
 use Drupal\Core\Entity\FieldableEntityInterface;
diff --git a/core/modules/system/menu.api.php b/core/modules/system/menu.api.php
index 95be071..f30f708 100644
--- a/core/modules/system/menu.api.php
+++ b/core/modules/system/menu.api.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Hooks and documentation related to the menu system, routing, and links.
+ * Hooks related to the Menu system.
  */
 
 /**
@@ -555,49 +555,5 @@ function hook_system_breadcrumb_alter(array &$breadcrumb, \Drupal\Core\Routing\R
 }
 
 /**
- * Alter the parameters for links.
- *
- * @param array $variables
- *   An associative array of variables defining a link. The link may be either a
- *   "route link" using \Drupal\Core\Utility\LinkGenerator::link(), which is
- *   exposed as the 'link_generator' service or a link generated by _l(). If the
- *   link is a "route link", 'route_name' will be set, otherwise 'path' will be
- *   set. The following keys can be altered:
- *   - text: The link text for the anchor tag as a translated string.
- *   - url_is_active: Whether or not the link points to the currently active
- *     URL.
- *   - url: The \Drupal\Core\Url object.
- *   - options: An associative array of additional options that will be passed
- *     to either \Drupal\Core\Routing\UrlGenerator::generateFromPath() or
- *     \Drupal\Core\Routing\UrlGenerator::generateFromRoute() to generate the
- *     href attribute for this link, and also used when generating the link.
- *     Defaults to an empty array. It may contain the following elements:
- *     - 'query': An array of query key/value-pairs (without any URL-encoding) to
- *       append to the URL.
- *     - absolute: Whether to force the output to be an absolute link (beginning
- *       with http:). Useful for links that will be displayed outside the site,
- *       such as in an RSS feed. Defaults to FALSE.
- *     - language: An optional language object. May affect the rendering of
- *       the anchor tag, such as by adding a language prefix to the path.
- *     - attributes: An associative array of HTML attributes to apply to the
- *       anchor tag. If element 'class' is included, it must be an array; 'title'
- *       must be a string; other elements are more flexible, as they just need
- *       to work as an argument for the constructor of the class
- *       Drupal\Core\Template\Attribute($options['attributes']).
- *     - html: Whether or not HTML should be allowed as the link text. If FALSE,
- *       the text will be run through
- *       \Drupal\Component\Utility\SafeMarkup::checkPlain() before being output.
- *
- * @see \Drupal\Core\Routing\UrlGenerator::generateFromPath()
- * @see \Drupal\Core\Routing\UrlGenerator::generateFromRoute()
- */
-function hook_link_alter(&$variables) {
-  // Add a warning to the end of route links to the admin section.
-  if (isset($variables['route_name']) && strpos($variables['route_name'], 'admin') !== FALSE) {
-    $variables['text'] .= ' (Warning!)';
-  }
-}
-
-/**
  * @} End of "addtogroup hooks".
  */
diff --git a/core/modules/system/module.api.php b/core/modules/system/module.api.php
index 9d5005e..52b77af 100644
--- a/core/modules/system/module.api.php
+++ b/core/modules/system/module.api.php
@@ -1,8 +1,7 @@
 <?php
-
 /**
  * @file
- * Hooks related to module and update systems.
+ * Hooks provided by Drupal core and the System module.
  */
 
 use Drupal\Core\Utility\UpdateException;
diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php
index 6b6882b..eb894f6 100644
--- a/core/modules/system/src/Form/ModulesListForm.php
+++ b/core/modules/system/src/Form/ModulesListForm.php
@@ -239,7 +239,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     $form['actions']['submit'] = array(
       '#type' => 'submit',
       '#value' => $this->t('Save configuration'),
-      '#button_type' => 'primary',
     );
 
     return $form;
diff --git a/core/modules/system/src/Form/ThemeAdminForm.php b/core/modules/system/src/Form/ThemeAdminForm.php
index 27f8098..9aa7123 100644
--- a/core/modules/system/src/Form/ThemeAdminForm.php
+++ b/core/modules/system/src/Form/ThemeAdminForm.php
@@ -49,7 +49,6 @@ public function buildForm(array $form, FormStateInterface $form_state, array $th
     $form['admin_theme']['actions']['submit'] = array(
       '#type' => 'submit',
       '#value' => $this->t('Save configuration'),
-      '#button_type' => 'primary',
     );
     return $form;
   }
diff --git a/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php b/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
index 57a97c2..f7036d3 100644
--- a/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
+++ b/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\system\Tests\Entity;
 
 use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
-use Drupal\image\Entity\ImageStyle;
 use Drupal\simpletest\WebTestBase;
 
 /**
@@ -124,7 +123,7 @@ protected function doImageStyleUpdate() {
     $name = 'image.style.thumbnail';
 
     /** @var $entity \Drupal\image\Entity\ImageStyle */
-    $entity = ImageStyle::load('thumbnail');
+    $entity = entity_load('image_style', 'thumbnail');
     $plugin_collection = $entity->getPluginCollections()['effects'];
 
     $effects = $entity->get('effects');
diff --git a/core/modules/system/src/Tests/Session/SessionTest.php b/core/modules/system/src/Tests/Session/SessionTest.php
index 4e67192..75b194a 100644
--- a/core/modules/system/src/Tests/Session/SessionTest.php
+++ b/core/modules/system/src/Tests/Session/SessionTest.php
@@ -138,18 +138,6 @@ function testDataPersistence() {
   }
 
   /**
-   * Tests storing data in Session() object.
-   */
-  public function testSessionPersistenceOnLogin() {
-    // Store information via hook_user_login().
-    $user = $this->drupalCreateUser();
-    $this->drupalLogin($user);
-    // Test property added to session object form hook_user_login().
-    $this->drupalGet('session-test/get-from-session-object');
-    $this->assertText('foobar', 'Session data is saved in Session() object.', 'Session');
-  }
-
-  /**
    * Test that empty anonymous sessions are destroyed.
    */
   function testEmptyAnonymousSession() {
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index bd391ed..34fb4a8 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Hooks provided by the System module.
+ * Hooks provided by Drupal core and the System module.
  */
 
 use Drupal\Component\Utility\SafeMarkup;
@@ -16,6 +16,54 @@
  */
 
 /**
+ * Flush all persistent and static caches.
+ *
+ * This hook asks your module to clear all of its static caches,
+ * in order to ensure a clean environment for subsequently
+ * invoked data rebuilds.
+ *
+ * Do NOT use this hook for rebuilding information. Only use it to flush custom
+ * caches.
+ *
+ * Static caches using drupal_static() do not need to be reset manually.
+ * However, all other static variables that do not use drupal_static() must be
+ * manually reset.
+ *
+ * This hook is invoked by drupal_flush_all_caches(). It runs before module data
+ * is updated and before hook_rebuild().
+ *
+ * @see drupal_flush_all_caches()
+ * @see hook_rebuild()
+ */
+function hook_cache_flush() {
+  if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') {
+    _update_cache_clear();
+  }
+}
+
+/**
+ * Rebuild data based upon refreshed caches.
+ *
+ * This hook allows your module to rebuild its data based on the latest/current
+ * module data. It runs after hook_cache_flush() and after all module data has
+ * been updated.
+ *
+ * This hook is only invoked after the system has been completely cleared;
+ * i.e., all previously cached data is known to be gone and every API in the
+ * system is known to return current information, so your module can safely rely
+ * on all available data to rebuild its own.
+ *
+ * @see hook_cache_flush()
+ * @see drupal_flush_all_caches()
+ */
+function hook_rebuild() {
+  $themes = \Drupal::service('theme_handler')->listInfo();
+  foreach ($themes as $theme) {
+    _block_rehash($theme->getName());
+  }
+}
+
+/**
  * Alters theme operation links.
  *
  * @param $theme_groups
@@ -280,5 +328,107 @@ function hook_token_info_alter(&$data) {
 }
 
 /**
+ * Alter the parameters for links.
+ *
+ * @param array $variables
+ *   An associative array of variables defining a link. The link may be either a
+ *   "route link" using \Drupal\Core\Utility\LinkGenerator::link(), which is
+ *   exposed as the 'link_generator' service or a link generated by _l(). If the
+ *   link is a "route link", 'route_name' will be set, otherwise 'path' will be
+ *   set. The following keys can be altered:
+ *   - text: The link text for the anchor tag as a translated string.
+ *   - url_is_active: Whether or not the link points to the currently active
+ *     URL.
+ *   - url: The \Drupal\Core\Url object.
+ *   - options: An associative array of additional options that will be passed
+ *     to either \Drupal\Core\Routing\UrlGenerator::generateFromPath() or
+ *     \Drupal\Core\Routing\UrlGenerator::generateFromRoute() to generate the
+ *     href attribute for this link, and also used when generating the link.
+ *     Defaults to an empty array. It may contain the following elements:
+ *     - 'query': An array of query key/value-pairs (without any URL-encoding) to
+ *       append to the URL.
+ *     - absolute: Whether to force the output to be an absolute link (beginning
+ *       with http:). Useful for links that will be displayed outside the site,
+ *       such as in an RSS feed. Defaults to FALSE.
+ *     - language: An optional language object. May affect the rendering of
+ *       the anchor tag, such as by adding a language prefix to the path.
+ *     - attributes: An associative array of HTML attributes to apply to the
+ *       anchor tag. If element 'class' is included, it must be an array; 'title'
+ *       must be a string; other elements are more flexible, as they just need
+ *       to work as an argument for the constructor of the class
+ *       Drupal\Core\Template\Attribute($options['attributes']).
+ *     - html: Whether or not HTML should be allowed as the link text. If FALSE,
+ *       the text will be run through
+ *       \Drupal\Component\Utility\SafeMarkup::checkPlain() before being output.
+ *
+ * @see \Drupal\Core\Routing\UrlGenerator::generateFromPath()
+ * @see \Drupal\Core\Routing\UrlGenerator::generateFromRoute()
+ */
+function hook_link_alter(&$variables) {
+  // Add a warning to the end of route links to the admin section.
+  if (isset($variables['route_name']) && strpos($variables['route_name'], 'admin') !== FALSE) {
+    $variables['text'] .= ' (Warning!)';
+  }
+}
+
+/**
+ * Alter the configuration synchronization steps.
+ *
+ * @param array $sync_steps
+ *   A one-dimensional array of \Drupal\Core\Config\ConfigImporter method names
+ *   or callables that are invoked to complete the import, in the order that
+ *   they will be processed. Each callable item defined in $sync_steps should
+ *   either be a global function or a public static method. The callable should
+ *   accept a $context array by reference. For example:
+ *   <code>
+ *     function _additional_configuration_step(&$context) {
+ *       // Do stuff.
+ *       // If finished set $context['finished'] = 1.
+ *     }
+ *   </code>
+ *   For more information on creating batches, see the
+ *   @link batch Batch operations @endlink documentation.
+ *
+ * @see callback_batch_operation()
+ * @see \Drupal\Core\Config\ConfigImporter::initialize()
+ */
+function hook_config_import_steps_alter(&$sync_steps, \Drupal\Core\Config\ConfigImporter $config_importer) {
+  $deletes = $config_importer->getUnprocessedConfiguration('delete');
+  if (isset($deletes['field.storage.node.body'])) {
+    $sync_steps[] = '_additional_configuration_step';
+  }
+}
+
+/**
+ * Alter config typed data definitions.
+ *
+ * For example you can alter the typed data types representing each
+ * configuration schema type to change default labels or form element renderers
+ * used for configuration translation.
+ *
+ * If implementations of this hook add or remove configuration schema a
+ * ConfigSchemaAlterException will be thrown. Keep in mind that there are tools
+ * that may use the configuration schema for static analysis of configuration
+ * files, like the string extractor for the localization system. Such systems
+ * won't work with dynamically defined configuration schemas.
+ *
+ * For adding new data types use configuration schema YAML files instead.
+ *
+ * @param $definitions
+ *   Associative array of configuration type definitions keyed by schema type
+ *   names. The elements are themselves array with information about the type.
+ *
+ * @see \Drupal\Core\Config\TypedConfigManager
+ * @see \Drupal\Core\Config\Schema\ConfigSchemaAlterException
+ */
+function hook_config_schema_info_alter(&$definitions) {
+  // Enhance the text and date type definitions with classes to generate proper
+  // form elements in ConfigTranslationFormBase. Other translatable types will
+  // appear as a one line textfield.
+  $definitions['text']['form_element_class'] = '\Drupal\config_translation\FormElement\Textarea';
+  $definitions['date_format']['form_element_class'] = '\Drupal\config_translation\FormElement\DateFormat';
+}
+
+/**
  * @} End of "addtogroup hooks".
  */
diff --git a/core/modules/system/tests/modules/session_test/session_test.module b/core/modules/system/tests/modules/session_test/session_test.module
index 6a08211..0fb2ae4 100644
--- a/core/modules/system/tests/modules/session_test/session_test.module
+++ b/core/modules/system/tests/modules/session_test/session_test.module
@@ -9,6 +9,4 @@ function session_test_user_login($account) {
     // before hook_user_login() was called.
     exit;
   }
-  // Add some data in the session for retrieval testing purpose.
-  \Drupal::request()->getSession()->set("session_test_key", "foobar");
 }
diff --git a/core/modules/system/tests/modules/session_test/session_test.routing.yml b/core/modules/system/tests/modules/session_test/session_test.routing.yml
index fce0fc9..8b9393e 100644
--- a/core/modules/system/tests/modules/session_test/session_test.routing.yml
+++ b/core/modules/system/tests/modules/session_test/session_test.routing.yml
@@ -5,13 +5,7 @@ session_test.get:
     _controller: '\Drupal\session_test\Controller\SessionTestController::get'
   requirements:
     _access: 'TRUE'
-session_test.get_from_session_object:
-  path: '/session-test/get-from-session-object'
-  defaults:
-    _title: 'Session value'
-    _controller: '\Drupal\session_test\Controller\SessionTestController::getFromSessionObject'
-  requirements:
-    _access: 'TRUE'
+
 session_test.id:
   path: '/session-test/id'
   defaults:
diff --git a/core/modules/system/tests/modules/session_test/src/Controller/SessionTestController.php b/core/modules/system/tests/modules/session_test/src/Controller/SessionTestController.php
index 4437743..1ae9a79 100644
--- a/core/modules/system/tests/modules/session_test/src/Controller/SessionTestController.php
+++ b/core/modules/system/tests/modules/session_test/src/Controller/SessionTestController.php
@@ -31,19 +31,6 @@ public function get() {
   }
 
   /**
-   * Prints the stored session value to the screen.
-   *
-   * @return string
-   *   A notification message.
-   */
-  public function getFromSessionObject() {
-    $value = \Drupal::request()->getSession()->get("session_test_key");
-    return empty($value)
-      ? []
-      : ['#markup' => $this->t('The current value of the stored session variable is: %val', array('%val' => $value))];
-  }
-
-  /**
    * Print the current session ID.
    *
    * @return string
diff --git a/core/modules/system/theme.api.php b/core/modules/system/theme.api.php
index 9e08b87..a9a6f61 100644
--- a/core/modules/system/theme.api.php
+++ b/core/modules/system/theme.api.php
@@ -1,11 +1,6 @@
 <?php
 
 /**
- * @file
- * Hooks and documentation related to the theme and render system.
- */
-
-/**
  * @defgroup themeable Theme system overview
  * @{
  * Functions and templates for the user interface that themes can override.
@@ -1111,22 +1106,17 @@ function hook_theme($existing, $type, $theme, $path) {
  *
  * For example:
  * @code
- * $theme_registry['block_content_add_list'] = array (
- *   'template' => 'block-content-add-list',
- *   'path' => 'core/themes/seven/templates',
- *   'type' => 'theme_engine',
- *   'theme path' => 'core/themes/seven',
- *   'includes' => array (
- *     0 => 'core/modules/block_content/block_content.pages.inc',
- *   ),
- *   'variables' => array (
- *     'content' => NULL,
+ * $theme_registry['user'] = array(
+ *   'variables' => array(
+ *     'account' => NULL,
  *   ),
- *   'preprocess functions' => array (
+ *   'template' => 'core/modules/user/user',
+ *   'file' => 'core/modules/user/user.pages.inc',
+ *   'type' => 'module',
+ *   'theme path' => 'core/modules/user',
+ *   'preprocess functions' => array(
  *     0 => 'template_preprocess',
- *     1 => 'template_preprocess_block_content_add_list',
- *     2 => 'contextual_preprocess',
- *     3 => 'seven_preprocess_block_content_add_list',
+ *     1 => 'template_preprocess_user_profile',
  *   ),
  * );
  * @endcode
diff --git a/core/modules/text/text.js b/core/modules/text/text.js
index 2ab1d0a..0895415 100644
--- a/core/modules/text/text.js
+++ b/core/modules/text/text.js
@@ -11,9 +11,9 @@
         var $widget = $(this).closest('.text-format-wrapper');
 
         var $summary = $widget.find('.text-summary-wrapper');
-        var $summaryLabel = $summary.find('label').eq(0);
+        var $summaryLabel = $summary.find('label').first();
         var $full = $widget.find('.text-full').closest('.form-item');
-        var $fullLabel = $full.find('label').eq(0);
+        var $fullLabel = $full.find('label').first();
 
         // Create a placeholder label when the field cardinality is greater
         // than 1.
diff --git a/core/modules/tour/js/tour.js b/core/modules/tour/js/tour.js
index 8d85e10..f8bc85f 100644
--- a/core/modules/tour/js/tour.js
+++ b/core/modules/tour/js/tour.js
@@ -206,7 +206,7 @@
             $(this).find('.tour-progress').text(progress);
           })
           // Update the last item to have "End tour" as the button.
-          .eq(-1)
+          .last()
           .attr('data-text', Drupal.t('End tour'));
       }
     }
diff --git a/core/modules/update/config/install/update.settings.yml b/core/modules/update/config/install/update.settings.yml
index 912a5b8..ded8c9d 100644
--- a/core/modules/update/config/install/update.settings.yml
+++ b/core/modules/update/config/install/update.settings.yml
@@ -1,4 +1,5 @@
 check:
+  disabled_extensions: false
   interval_days: 1
 fetch:
   url: ''
diff --git a/core/modules/update/config/schema/update.schema.yml b/core/modules/update/config/schema/update.schema.yml
index a390c6b..b827c56 100644
--- a/core/modules/update/config/schema/update.schema.yml
+++ b/core/modules/update/config/schema/update.schema.yml
@@ -8,6 +8,9 @@ update.settings:
       type: mapping
       label: 'Check settings'
       mapping:
+        disabled_extensions:
+          type: boolean
+          label: 'Check for updates of disabled modules and themes'
         interval_days:
           type: integer
           label: 'Days since last check'
diff --git a/core/modules/update/src/Form/UpdateManagerInstall.php b/core/modules/update/src/Form/UpdateManagerInstall.php
index 43d1f62..b3e2deb 100644
--- a/core/modules/update/src/Form/UpdateManagerInstall.php
+++ b/core/modules/update/src/Form/UpdateManagerInstall.php
@@ -104,7 +104,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['submit'] = array(
       '#type' => 'submit',
-      '#button_type' => 'primary',
       '#value' => $this->t('Install'),
     );
 
diff --git a/core/modules/update/src/Tests/UpdateContribTest.php b/core/modules/update/src/Tests/UpdateContribTest.php
index b4ff5e4..dde3e52 100644
--- a/core/modules/update/src/Tests/UpdateContribTest.php
+++ b/core/modules/update/src/Tests/UpdateContribTest.php
@@ -250,6 +250,23 @@ function testUpdateShowDisabledThemes() {
     );
     $base_theme_project_link = \Drupal::l(t('Update test base theme'), Url::fromUri('http://example.com/project/update_test_basetheme'));
     $sub_theme_project_link = \Drupal::l(t('Update test subtheme'), Url::fromUri('http://example.com/project/update_test_subtheme'));
+    foreach (array(TRUE, FALSE) as $check_disabled) {
+      $update_settings->set('check.disabled_extensions', $check_disabled)->save();
+      $this->refreshUpdateStatus($xml_mapping);
+      // In neither case should we see the "Themes" heading for installed
+      // themes.
+      $this->assertNoText(t('Themes'));
+      if ($check_disabled) {
+        $this->assertText(t('Disabled themes'));
+        $this->assertRaw($base_theme_project_link, 'Link to the Update test base theme project appears.');
+        $this->assertRaw($sub_theme_project_link, 'Link to the Update test subtheme project appears.');
+      }
+      else {
+        $this->assertNoText(t('Disabled themes'));
+        $this->assertNoRaw($base_theme_project_link, 'Link to the Update test base theme project does not appear.');
+        $this->assertNoRaw($sub_theme_project_link, 'Link to the Update test subtheme project does not appear.');
+      }
+    }
   }
 
   /**
diff --git a/core/modules/update/src/UpdateManager.php b/core/modules/update/src/UpdateManager.php
index 3b052af..b92251b 100644
--- a/core/modules/update/src/UpdateManager.php
+++ b/core/modules/update/src/UpdateManager.php
@@ -138,6 +138,10 @@ public function getProjects() {
         $project_info = new ProjectInfo();
         $project_info->processInfoList($this->projects, $module_data, 'module', TRUE);
         $project_info->processInfoList($this->projects, $theme_data, 'theme', TRUE);
+        if ($this->updateSettings->get('check.disabled_extensions')) {
+          $project_info->processInfoList($this->projects, $module_data, 'module', FALSE);
+          $project_info->processInfoList($this->projects, $theme_data, 'theme', FALSE);
+        }
         // Allow other modules to alter projects before fetching and comparing.
         $this->moduleHandler->alter('update_projects', $this->projects);
         // Store the site's project data for at most 1 hour.
diff --git a/core/modules/update/src/UpdateSettingsForm.php b/core/modules/update/src/UpdateSettingsForm.php
index a824c9b..7b29880 100644
--- a/core/modules/update/src/UpdateSettingsForm.php
+++ b/core/modules/update/src/UpdateSettingsForm.php
@@ -75,6 +75,12 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#description' => t('Select how frequently you want to automatically check for new releases of your currently installed modules and themes.'),
     );
 
+    $form['update_check_disabled'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Check for updates of disabled modules and themes'),
+      '#default_value' => $config->get('check.disabled_extensions'),
+    );
+
     $notification_emails = $config->get('notification.emails');
     $form['update_notify_emails'] = array(
       '#type' => 'textarea',
@@ -136,8 +142,14 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $config = $this->config('update.settings');
+     // See if the update_check_disabled setting is being changed, and if so,
+    // invalidate all update status data.
+    if ($form_state->getValue('update_check_disabled') != $config->get('check.disabled_extensions')) {
+      update_storage_clear();
+    }
 
     $config
+      ->set('check.disabled_extensions', $form_state->getValue('update_check_disabled'))
       ->set('check.interval_days', $form_state->getValue('update_check_frequency'))
       ->set('notification.emails', $form_state->get('notify_emails'))
       ->set('notification.threshold', $form_state->getValue('update_notification_threshold'))
diff --git a/core/modules/user/src/Tests/UserSaveStatusTest.php b/core/modules/user/src/Tests/UserSaveStatusTest.php
deleted file mode 100644
index d1410a1..0000000
--- a/core/modules/user/src/Tests/UserSaveStatusTest.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\user\Tests\UserSaveStatusTest.
- */
-
-namespace Drupal\user\Tests;
-
-use Drupal\simpletest\KernelTestBase;
-use Drupal\user\Entity\User;
-
-/**
- * Tests user saving status.
- *
- * @group user
- */
-class UserSaveStatusTest extends KernelTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('system', 'user', 'field');
-
-  protected function setUp() {
-    parent::setUp();
-    $this->installEntitySchema('user');
-  }
-
-  /**
-   * Test SAVED_NEW and SAVED_UPDATED statuses for user entity type.
-   */
-  function testUserSaveStatus() {
-    // Create a new user.
-    $values = array(
-      'uid' => 1,
-      'name' => $this->randomMachineName(),
-    );
-    $user = User::create($values);
-
-    // Test SAVED_NEW.
-    $return = $user->save();
-    $this->assertEqual($return, SAVED_NEW, "User was saved with SAVED_NEW status.");
-
-    // Test SAVED_UPDATED.
-    $user->name = $this->randomMachineName();
-    $return = $user->save();
-    $this->assertEqual($return, SAVED_UPDATED, "User was saved with SAVED_UPDATED status.");
-  }
-
-}
diff --git a/core/modules/user/src/UserStorage.php b/core/modules/user/src/UserStorage.php
index 4aad5c5..f404b8d 100644
--- a/core/modules/user/src/UserStorage.php
+++ b/core/modules/user/src/UserStorage.php
@@ -79,7 +79,7 @@ public function save(EntityInterface $entity) {
       $entity->uid->value = $this->database->nextId($this->database->query('SELECT MAX(uid) FROM {users}')->fetchField());
       $entity->enforceIsNew();
     }
-    return parent::save($entity);
+    parent::save($entity);
   }
 
   /**
diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js
index 7f217dc..236b746 100644
--- a/core/modules/views_ui/js/views-admin.js
+++ b/core/modules/views_ui/js/views-admin.js
@@ -241,7 +241,7 @@
       var $addDisplayDropdown = $('<li class="add"><a href="#"><span class="icon add"></span>' + Drupal.t('Add') + '</a><ul class="action-list" style="display:none;"></ul></li>');
       var $displayButtons = $menu.nextAll('input.add-display').detach();
       $displayButtons.appendTo($addDisplayDropdown.find('.action-list')).wrap('<li>')
-        .parent().eq(0).addClass('first').end().eq(-1).addClass('last');
+        .parent().first().addClass('first').end().last().addClass('last');
       // Remove the 'Add ' prefix from the button labels since they're being palced
       // in an 'Add' dropdown.
       // @todo This assumes English, but so does $addDisplayDropdown above. Add
@@ -701,7 +701,7 @@
         // Within the row, the operator labels are displayed inside the first table
         // cell (next to the filter name).
         var $draggableRow = $(this.draggableRows[i]);
-        var $firstCell = $draggableRow.find('td').eq(0);
+        var $firstCell = $draggableRow.find('td:first');
         if ($firstCell.length) {
           // The value of the operator label ("And" or "Or") is taken from the
           // first operator dropdown we encounter, going backwards from the current
diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
index e704538..1ffdfe0 100644
--- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
@@ -489,37 +489,6 @@ public function testQuestionSign() {
   }
 
   /**
-   * Check that strings in HTML attributes are are correctly processed.
-   *
-   * @covers ::attributes
-   * @dataProvider providerTestAttributes
-   */
-  public function testAttribute($value, $expected, $message, $allowed_tags = NULL) {
-    $value = Xss::filter($value, $allowed_tags);
-    $this->assertEquals($expected, $value, $message);
-  }
-
-  /**
-   * Data provider for testFilterXssAdminNotNormalized().
-   */
-  public function providerTestAttributes() {
-    return array(
-      array(
-        '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt">',
-        '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt">',
-        'Image tag with alt and title attribute',
-        array('img')
-      ),
-      array(
-        '<img src="http://example.com/foo.jpg" data-caption="Drupal 8: The best release ever.">',
-        '<img src="http://example.com/foo.jpg" data-caption="Drupal 8: The best release ever.">',
-        'Image tag with data attribute',
-        array('img')
-      ),
-    );
-  }
-
-  /**
    * Checks that \Drupal\Component\Utility\Xss::filterAdmin() correctly strips unallowed tags.
    */
   public function testFilterXSSAdmin() {
diff --git a/core/themes/seven/css/base/print.css b/core/themes/seven/css/base/print.css
index 653e511..bb87d92 100644
--- a/core/themes/seven/css/base/print.css
+++ b/core/themes/seven/css/base/print.css
@@ -47,7 +47,7 @@
   }
   .messages {
     border-width: 1px;
-    border-color: #999;
+    border-left-color: #999;
   }
   .is-collapse-enabled .tabs {
     max-height: 999em;
diff --git a/core/themes/seven/css/components/buttons.css b/core/themes/seven/css/components/buttons.css
index d0c24fb..c6e0d3d 100644
--- a/core/themes/seven/css/components/buttons.css
+++ b/core/themes/seven/css/components/buttons.css
@@ -110,19 +110,13 @@
  * Overrides styling from system.theme.
  */
 .button-action:before {
-  margin-left: -0.2em; /* LTR */
-  padding-right: 0.2em; /* LTR */
+  margin-left: -0.2em;
+  padding-right: 0.2em;
   font-size: 14px;
   font-size: 0.875rem;
   line-height: 16px;
   -webkit-font-smoothing: auto;
 }
-[dir="rtl"] .button-action:before {
-  margin-right: -0.2em;
-  margin-left: 0;
-  padding-right: 0;
-  padding-left: 0.2em;
-}
 
 /**
  * 1. Use px units to ensure button text is centered vertically.
diff --git a/core/themes/seven/css/components/dialog.theme.css b/core/themes/seven/css/components/dialog.theme.css
index e7096b5..7dfd9cc 100644
--- a/core/themes/seven/css/components/dialog.theme.css
+++ b/core/themes/seven/css/components/dialog.theme.css
@@ -33,17 +33,13 @@
 .ui-dialog .ui-dialog-titlebar-close {
   border: 0;
   background: none;
-  right: 20px; /* LTR */
+  right: 20px;
   top: 20px;
   margin: 0;
   height: 16px;
   width: 16px;
   position: absolute;
 }
-[dir="rtl"] .ui-dialog .ui-dialog-titlebar-close {
-  right: auto;
-  left: 20px;
-}
 .ui-dialog .ui-icon.ui-icon-closethick {
   background: url(../../../../misc/icons/ffffff/ex.svg) 0 0 no-repeat;
   margin-top: -12px;
@@ -83,7 +79,7 @@
 }
 .ui-dialog .ajax-progress-throbber {
   /* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
-  left: 49%; /* LTR */
+  left: 49%;
   position: fixed;
   top: 48.5%;
   z-index: 1000;
@@ -97,10 +93,6 @@
   padding: 4px;
   width: 24px;
 }
-[dir="rtl"] .ui-dialog .ajax-progress-throbber {
-  left: auto;
-  right: 49%;
-}
 .ui-dialog .ajax-progress-throbber .throbber,
 .ui-dialog .ajax-progress-throbber .message {
   display: none;
diff --git a/core/themes/seven/css/components/dropbutton.component.css b/core/themes/seven/css/components/dropbutton.component.css
index 6f08502..9c6db04 100644
--- a/core/themes/seven/css/components/dropbutton.component.css
+++ b/core/themes/seven/css/components/dropbutton.component.css
@@ -16,18 +16,10 @@
   font-weight: 600;
   line-height: normal;
   -webkit-font-smoothing: antialiased;
-  text-align: left; /* LTR */
-}
-[dir="rtl"] .js .dropbutton .dropbutton-action > input,
-[dir="rtl"] .js .dropbutton .dropbutton-action > a,
-[dir="rtl"] .js .dropbutton .dropbutton-action > button {
-  text-align: right;
+  text-align: left;
 }
 .js .dropbutton-action.last {
-  border-radius: 0 0 0 1em; /* LTR */
-}
-[dir="rtl"] .js .dropbutton-action.last {
-  border-radius: 0 0 1em 0;
+  border-radius: 0 0 0 1em;
 }
 
 /**
@@ -244,13 +236,9 @@
 }
 .dropbutton-arrow {
   border-top-color: #333;
-  right: 35%; /* LTR */
+  right: 35%;
   top: 54%;
 }
-[dir="rtl"] .dropbutton-arrow {
-  left: 35%;
-  right: auto;
-}
 .dropbutton-multiple.open .dropbutton-arrow {
   border-bottom: 0.3333em solid #333;
   border-top-color: transparent;
diff --git a/core/themes/seven/css/components/form.css b/core/themes/seven/css/components/form.css
index d1c517f..17d75a4 100644
--- a/core/themes/seven/css/components/form.css
+++ b/core/themes/seven/css/components/form.css
@@ -130,8 +130,8 @@ input.form-file,
 input.form-date,
 input.form-time,
 textarea.form-textarea {
-  box-sizing: border-box;
-  padding: .3em .4em .3em .5em; /* LTR */
+  box-sizing:         border-box;
+  padding: .3em .4em .3em .5em;
   max-width: 100%;
   border: 1px solid #b8b8b8;
   border-top-color: #999;
@@ -145,9 +145,6 @@ textarea.form-textarea {
   -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
   transition: border linear 0.2s, box-shadow linear 0.2s;
 }
-[dir="rtl"] textarea.form-textarea {
-  padding: .3em .5em .3em .4em;
-}
 .form-text:focus,
 .form-tel:focus,
 .form-email:focus,
@@ -173,12 +170,11 @@ textarea.form-textarea {
 
 .form-item .password-suggestions {
   float: left; /* LTR */
-  clear: left; /* LTR */
+  clear: left;
   width: 100%;
 }
 [dir="rtl"] .form-item .password-suggestions {
   float: right;
-  clear: right;
 }
 .form-item-pass .description {
   clear: both;
diff --git a/core/themes/seven/css/components/jquery.ui/theme.css b/core/themes/seven/css/components/jquery.ui/theme.css
index 6732809..12d36ed 100644
--- a/core/themes/seven/css/components/jquery.ui/theme.css
+++ b/core/themes/seven/css/components/jquery.ui/theme.css
@@ -86,12 +86,9 @@
   background-image: url(../../../images/ui-icons-ffffff-256x240.png);
 }
 .ui-widget p .ui-icon {
-  margin: 2px 3px 0 0; /* LTR */
+  margin: 2px 3px 0 0;
 }
 
-[dir="rtl"] .ui-widget p .ui-icon {
-  margin: 2px 0 0 3px;
-}
 /* positioning */
 .ui-icon-carat-1-ne { background-position: -16px 0; }
 .ui-icon-carat-1-e { background-position: -32px 0; }
@@ -310,13 +307,10 @@
   border-bottom-right-radius: 0;
 }
 .ui-tabs .ui-tabs-nav li {
-  padding: 0 1em 0 10px; /* LTR */
+  padding: 0 1em 0 10px;
   margin: 0;
   list-style: none;
 }
-[dir="rtl"] .ui-tabs .ui-tabs-nav li {
-  padding: 0 10px 0 1em;
-}
 .ui-tabs .ui-tabs-nav li a {
   float: none;
   padding: 0 10px;
diff --git a/core/themes/seven/css/components/pager.css b/core/themes/seven/css/components/pager.css
index 6a84de3..9984437 100644
--- a/core/themes/seven/css/components/pager.css
+++ b/core/themes/seven/css/components/pager.css
@@ -3,12 +3,9 @@
  * Styles for Seven's Pagination.
  */
 .pager__items {
-  margin: 0.25em 0 0.25em 1.5em; /* LTR */
+  margin: 0.25em 0 0.25em 1.5em;
   padding: 0;
 }
-[dir="rtl"] .pager__items {
-  margin: 0.25em 1.5em 0.25em 0;
-}
 .pager__item {
   display: inline-block;
   color: #8c8c8c;
diff --git a/core/themes/seven/css/components/tour.theme.css b/core/themes/seven/css/components/tour.theme.css
index d2ac534..a5e0cc4 100644
--- a/core/themes/seven/css/components/tour.theme.css
+++ b/core/themes/seven/css/components/tour.theme.css
@@ -34,22 +34,14 @@
 }
 .joyride-tip-guide .joyride-nub.right {
   border-top-color: transparent;
-  border-right-color: transparent; /* LTR */
+  border-right-color: transparent;
   border-bottom-color: transparent;
 }
-[dir="rtl"] .joyride-tip-guide .joyride-nub.right {
-  border-left-color: transparent;
-  border-right-color: rgba(0,0,0, 0.8);
-}
 .joyride-tip-guide .joyride-nub.left {
   border-top-color: transparent;
-  border-left-color: transparent; /* LTR */
+  border-left-color: transparent;
   border-bottom-color: transparent;
 }
-[dir="rtl"] .joyride-tip-guide .joyride-nub.left {
-  border-left-color: rgba(0,0,0, 0.8);
-  border-right-color: transparent;
-}
 .joyride-tip-guide .joyride-nub.top-right {
   border-top-color: transparent;
   border-left-color: transparent;
diff --git a/core/themes/seven/css/components/vertical-tabs.css b/core/themes/seven/css/components/vertical-tabs.css
index e3bd0eb..dc300f1 100644
--- a/core/themes/seven/css/components/vertical-tabs.css
+++ b/core/themes/seven/css/components/vertical-tabs.css
@@ -32,10 +32,6 @@
   width: 100%;
   border-right: 1px solid #fcfcfa; /* LTR */
   box-shadow: 0 5px 5px -5px hsla(0, 0%, 0%, 0.3);
-  border-bottom: 1px solid #b3b2ad;
-}
-.vertical-tabs__menu-item.last {
-  border-bottom: none;
 }
 [dir="rtl"] .vertical-tabs__menu-item.is-selected {
   border-left: 1px solid #fcfcfa;
@@ -45,9 +41,6 @@
 .vertical-tabs__menu-item:active {
   z-index: 2;
 }
-.vertical-tabs__menu-item.is-selected:focus {
-  outline: none;
-}
 .vertical-tabs__menu-item a {
   display: block;
   padding: 10px 15px 15px;
@@ -67,18 +60,8 @@
   text-decoration: none;
 }
 .vertical-tabs__menu-item.is-selected a {
+  border-bottom-color: #b3b2ad;
   color: #004f80;
-  border-left: 4px solid #0074bd; /* LTR */
-  padding-left: 11px; /* LTR */
-  border-bottom: none;
-  outline: none;
-  text-decoration: none;
-}
-[dir=rtl] .vertical-tabs__menu-item.is-selected a {
-  border-left: 0;
-  border-right: 4px solid #0074bd;
-  padding-left: 15px;
-  padding-right: 11px;
 }
 .vertical-tabs__menu-item.is-selected a:hover,
 .vertical-tabs__menu-item.is-selected a:focus {
diff --git a/core/themes/seven/css/components/views-ui.css b/core/themes/seven/css/components/views-ui.css
index 960d008..837ae32 100644
--- a/core/themes/seven/css/components/views-ui.css
+++ b/core/themes/seven/css/components/views-ui.css
@@ -242,11 +242,7 @@ details.fieldset-no-legend {
 }
 
 .views-ui-rearrange-filter-form tr td:last-child {
-  border-right: medium none; /* LTR */
-}
-[dir="rtl"] .views-ui-rearrange-filter-form tr td:last-child {
-  border-left: medium none;
-  border-right: initial;
+  border-right: medium none;
 }
 
 .views-ui-rearrange-filter-form .filter-group-operator-row {
@@ -281,11 +277,7 @@ details.fieldset-no-legend {
 
 .views-query-info table tr td:last-child {
   /* Fixes a Seven style that bleeds down into this table unnecessarily */
-  border-right: 0 none; /* LTR */
-}
-[dir="rtl"] .views-query-info table tr td:last-child {
-  border-left: 0 none;
-  border-right: initial;
+  border-right: 0 none;
 }
 
 /* @end */
diff --git a/core/themes/seven/css/theme/install-page.css b/core/themes/seven/css/theme/install-page.css
index 3a2f217..c43b42e 100644
--- a/core/themes/seven/css/theme/install-page.css
+++ b/core/themes/seven/css/theme/install-page.css
@@ -14,12 +14,9 @@
     url(../../images/noise-low.png),
     radial-gradient(hsl(203, 80%, 45%), hsl(203, 80%, 32%));
   background-repeat: repeat;
-  background-position: left top, 50% 50%; /* LTR */
+  background-position: left top, 50% 50%;
   min-height: 100%;
 }
-[dir="rtl"] .install-page {
-  background-position: right top, 50% 50%;
-}
 
 /**
  * Password widget
diff --git a/core/themes/seven/css/theme/maintenance-page.css b/core/themes/seven/css/theme/maintenance-page.css
index 2d9c30d..f6b93a0 100644
--- a/core/themes/seven/css/theme/maintenance-page.css
+++ b/core/themes/seven/css/theme/maintenance-page.css
@@ -7,12 +7,9 @@
   background-image: -webkit-radial-gradient(hsl(203, 2%, 90%), hsl(203, 2%, 95%));
   background-image: radial-gradient(hsl(203, 2%, 90%), hsl(203, 2%, 95%));
   background-repeat: repeat;
-  background-position: left top, 50% 50%; /* LTR */
+  background-position: left top, 50% 50%;
   min-height: 100%;
 }
-[dir="rtl"] .maintenance-page {
-  background-position: right top, 50% 50%;
-}
 
 .page-title {
   font-size: 2em;
